Problems displaying CSS styles while using an IFRAME

Getting Rid of Borders on IFRAME:

To get rid of borders while using IFRAME,normally the CSS style below would do the trick


This works well on the browser Firefox. However, the IFRAME border doesn't show up on IE as expected this way. To get rid of it on IE, You may have to include the (non-CSS) IFRAME element frameborder='0'



Applying Background Color to an IFRAME:

I have had problems applying background color to an IFRAME once.

While the code below works perfectly on Firefox, it again poses a problem while displaying on IE.


Styles in Iframe don't work completely as expected in Internet Explorer. For this, you need to define the background color in the 'page.php' file you are calling into the IFRAME instead.

Perhaps the easiest way would be to ensure that the body tag in 'page.php' has a background color tied to it as


OR
you could even use the CSS Style (recommended) to make this happen as below. Include the code below to the file page.php

These simple two lines of code would do the magic which would otherwise require a bit of brainstorming on your part.