View Full Version : Styling an iframe. Help please.

Jan 27th, 2010, 11:29 PM

I have an iframe on this page with a file called homepage.html as the src:


Although I would like it to be styled to look like this:


homepage.html is within the div #groupsPan defined in main.css and the iframe styling is within the div #iframePan also defined in main.css.

I would like to remove the current horizontal scroll and have the positioning the same as the second link provided - cant seem to get it right though! Im sure it something to do with the widths of the two divs and padding/margins but everything I alters doesnt seem to make much affect.

Can someone please take a look?

Many Thanks,

Jan 27th, 2010, 11:41 PM
At the bottom where you define the iframe:

<iframe src="homepage.html" border="0" frameborder="0" id="RSSItemContentIFrame" name="MainArea" scrolling="yes"></iframe>

Change to scrolling="no"

That should remove the scrollbars.

Jan 28th, 2010, 12:27 AM
Unfortunately I cant use that solution as the iframe is used to return results from a search. If there is a long list of results from the search I would need the iframe to have a vertical scroll.

I think its the styles of the divs that I need help with....

Jan 28th, 2010, 02:04 AM
iframes are depracated in xhtml 1.0 and above, and cause a lot of problems in any other version of html. I think the best way to go if you are running into iframe issues is to find another solution.

I tried to use an iframe once, and it really was more trouble than it was worth - they display differently across different browsers and are super unreliable.

Is there any way you can create the effect your looking for without one?

Jan 28th, 2010, 11:20 AM
Unfortunately I need to use an iframe to comply with the clients requests and to ensure it works with their standard search requirements.

The only other option I can think of is to keep index.html as it is but when the search is performed and the 'Go' button is clicked the user is taken to: http://www.michael-williams.com.au/search.html

In which case I wouldnt need the seperate homepage.html file or an iframe on the index.html. However with this solution I don't know how to pass the search query to the iframe on search.html.

Are you aware of any solution for this? Or should I post query in a different forum?