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.

Question:

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

Answer:

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.

<SCRIPT>
function moveRight () {
  var ifr = document.all ? 
              document.all['anIframe'] : 
              document.getElementById('anIframe');
  ifr.style.left = (parseInt(ifr.style.left) + 10) + 'px';
}
</SCRIPT>

Content-type: text/html

Comments:

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 https://essayreviewr..tings.com/ and bookmarked it also.

 

 

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: