This is a form that i want to embed on my site, however, i need it scrolled down a little and also to the right (i can specify how many pixels if there is an html tag for it) and i also need the Scroll bar to be hidden. How would i do that? Any help would be greatly appreciated. Thank you in advance. <script> var href = window.location.href; var url = "http://www.example.com/options/registration/embed/?a_aid=22041882"; var isIE = /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent); var width = (isIE ? 320 : 315); var height = (isIE ? 330 : 300); document.write("<iframe width='" + width + "' height='" + height + "' src='" + url + "' style='border: none; overflow: hidden;'></iframe>"); </script> Code (markup): this is how it looks like:
A bit of context might be useful as my first reaction to your post is "why are you doing it like that?". If I may explain: 1. You are embedding your form using JavaScript which is both unnecessary and bad for accessibility (i.e. if the user has JavaScript turned off and some devices will struggle with it) 2. iFrames are somewhat of an obsolete feature (I know this can be argued), you can use scrolling DIV's now. Unless this form is on a remote server? Anyway to answer the question at hand... 1. The scrolling is because the form itself is bigger than the iFrame, you can set the width and height of the iFrame (the var width and var height JS are controlling the width and height of the iFrame) 2. You can turn scrollbars off on the iFrame by adding scrolling="yes" or scrolling="no" into the iframe tag. There is also an auto setting (scrolling="auto"), but setting to "no" will turn the scrollbars off. Example: <iframe src="somepage.php" width="350" height="250" scrolling="no"> <p>Your browser does not support iFrames.</p> </iframe> Code (markup): Inside the iFrame tag you can have a bit where the user sees a message if iFrames are not supported (best practice would be to put an alternative method; in your case an alternative form; here). You can also pad iframe using CSS to get it positioned, but its all quite "nasty" imo. It's better to use different methods, which depends on what you are actually trying to do.