View Full Version : Iframe spacing problem, help please
10-15-2008, 09:04 PM
I have an iframe in my page, and there is space in the top and the bottom of the frame that is the same as the background color and I can't figure out how to get rid of it. See attached image.
10-15-2008, 09:41 PM
Your problem is actually in the CSS of this page, and it applies to the page's bottom as well: http://www.cynergy.tv/test/bios.php
}Remove those lines and the black will disappear on all pages that use that CSS.
10-15-2008, 10:51 PM
Hey Chris, that got rid of the space on the bottom of the iframe but not the top. Anymore suggestions would be awesome, appreciate what I have got so far.
10-16-2008, 12:15 AM
"bgcolor" is deprecated. You should use css to declare the background color in your stylesheet. I'm guessing you were probably trying to "override" something somehow, but it doesn't work either way. So in the source of your iframe, you should remove this...
Also, the reason you have that dark section at the top of your IFRAME is because the iframe is using the same stylesheet as the main page (main.css), and in that stylesheet the attribute "background-color" is set to a dark color ( background-color:#2C3438; )
I changed it to "#ffffff" using firebug and it did not affect the "parent" page, so I'm assuming you could probably change it without it affecting anything.
10-16-2008, 12:25 AM
if you don't like the solution above, you could also try this approach...
In the source of your iframe (bios.php), add this to the head section.
/*IFRAME MARGIN OVERRIDE*/
margin:-15px auto 0 !important;
10-16-2008, 03:13 PM
Thanks you sooooo much!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.