I had a div containing a bunch of tags with corresponding css, all of which needs to be moved into an iframe. However, when I do that, the iframe version looks different.
I have already copied the css that was applied to those parts of the parent page into the stylesheet for the iframe. However when styling the border of the div -> iframe, it’s unclear which styles should be applied to the body tag of the iframe, and which styles should be applied the iframe tag in the parent page.
You just need to give both elements the same style.
HTML
Note: The
frameborderattribute is essential for IE<9 to avoid the ugly looking 3D border.CSS
Here’s a fiddle containing that code.