View Full Version : Need an IE CSS Hack
qwerty
06-11-2004, 21:03/09:03PM
I've been working on cleaning up a site, adding a style sheet, losing nested tables and using SSIs for the top banner, navigation, and footer.
It seems to be coming along ok when I view my test page in FireFox, but in IE, I get a little gap between the bottom of the banner and the top of the navigation menu :steaming:
The test page is at http://www.bestcashadvance.com/test.aspx
Connie
06-11-2004, 21:57/09:57PM
You might add this to the doc type "http://www.w3.org/TR/html4/loose.dtd"
That should take IE out of Quricks mode. It may also cause problems with FireFox.
I didn't look at your style sheet but if absolute positioning is involved it may just be a matter of raising the left Nav slightly.
Just a personal openion. Since the blue on the top header is slightly different than the left Nav I don't see anything wrong with that break. The two darker blues do not blend together.
But then I don't know much. Any way your basic design looks good.
:cheers:
polarmate
06-11-2004, 21:59/09:59PM
It's coming from the <map> tag. It's a block element.
Either move it out to the bottom of the page or set the display of the map element to inline.
qwerty
07-11-2004, 00:27/12:27AM
Hm... Well, I added the second half of the DTD (I really do forget that too often), I set the map element to display: inline in the CSS, and I moved the map from the top include file to the footer.
I'm still getting that gap in IE though. And I agree, it doesn't look great with the difference between those blues, but it's what the client wants. My job is just to clean it up.
polarmate
07-11-2004, 00:31/12:31AM
Sent you a PM with a URL to check it out at.
I added the second part of the DTD cos I like to have the complete statement. I don't know if it's a preference thing or a required thing.
(Did you clear your cache when you viewed the page?)
srikanthsh
07-11-2004, 02:25/02:25AM
Bob, keep TD opening tag, IMG tag, and TD closing tag in one line.
This way:
<td><img src="images/x.gif border="0" alt=""..></td>
qwerty
07-11-2004, 09:24/09:24AM
Yes! That did it. Because the top banner and the left nav are includes, the server was throwing in those line breaks. So I put the opening and closing <td></td> into the include files, forcing the server to lay out the code the right way, and that seems to have made the difference.
Thanks everyone :)
polarmate
07-11-2004, 18:46/06:46PM
Wow! Super!
Question: Is this with the map tag in there or without?
qwerty
07-11-2004, 19:41/07:41PM
The map's in the footer include file, and all seems well. I'm almost done with the site. I should have been done by now, but their FAQ page took me about 2.5 hours, just to clean up the mess that was in there.
polarmate
08-11-2004, 01:30/01:30AM
I had to find out what the reason was for this behavior....
Apparently the technical reason behind this is that IE translates the new line character within the HTML code as a space. My husband tells me this is a well known fact.
The map element was a red herring - it's all about removing the line break before the closing td cell. Sorry about the wild goose chase. The URLs I sent you had no line break before the closing td. But it did not work because the map tag wrapped over more than one line. Moving the map tag out was what worked - in my eyes at least. :rolleyes:
Sorry to have wasted your time!!
qwerty
08-11-2004, 11:09/11:09AM
No waste; we learned something from all this.
The silly thing about it is that this IE problem was being caused by the way .net creates a line break in the code when it inserts an include file. MS screws up MS. Shocking ;)
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.