DelphiFAQ Home Search:

Move an IFRAME 10 pixels to the right


commentsThis article has not been rated yet. After reading, feel free to leave comments and rate it.


I need to move an IFRAME 10 pixels to the right. Is that possible in JavaScript?


Thanks to CSS you can position your IFRAME like all other HTML elements through the style.left property. The code sample from below moves the IFRAME titled 'anIframe' 10 pixels to the right.

function moveRight () {
  var ifr = document.all ? 
              document.all['anIframe'] : 
              document.getElementById('anIframe'); = (parseInt( + 10) + 'px';


2017-09-19, 01:24:22
anonymous from India  
Good and really attractive!
Valuable information. Lucky me I discovered your submit by accident, and I’m surprised and did not happened earlier! I bookmarked it. And also I am so happy because of I got the chance to reach my destination. I have accessed with good writing resource and bookmarked it also.
2018-03-22, 06:33:34
neiljakson from Pakistan  
Thanks for this wonderful post. The information in this article is very helpful to me. Thanks a lot for sharing. Keep blogging.

2020-04-22, 07:51:52
anonymous from Australia  



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: