...

View Full Version : Internet Explorer Hack



Volsfan91
05-09-2008, 03:25 AM
Ugh... another fight with this and I don't know how to fix it.

Page display in FireFox:

http://i30.tinypic.com/2rh31hj.jpg

Page display in IE:

http://i29.tinypic.com/oi9btg.jpg

That's IE6 btw.

Here's the code:


#top {
margin-left: 650px;
margin-top: 200px;
vertical-align:top;
border: 0px;
background-color: transparent;
height: 527px;
width: 49px;
}

And here's how it's used in the HTML:


<div id="top">
<img src="images/test.gif" width=49 height=527>
</div>

BabyJack
05-09-2008, 07:09 AM
Em, I'm not quite sure but you might have to scour the web for the hack that uses a different stylesheet for each browser. Mabeys someone will know it but I forgot it ;)

shedokan
05-09-2008, 09:10 AM
use this code:

<!--[if IE 7]><link rel="stylesheet" type="text/css" href="Your IE Style Sheet.css" /><![endif]-->
I can't remember what to use for FF

abduraooft
05-09-2008, 09:22 AM
Change your doctype to

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
And rectify all markup errors, see http://validator.w3.org/check?uri=http&#37;3A%2F%2Fwww.877bunksrus.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

rangana
05-09-2008, 09:27 AM
abduraooft ,
Off topic, how did you know about the OP's page, when he has'nt given any link yet?
....rather 2 comparison images.

FWDrew
05-09-2008, 09:45 AM
abduraooft ,
Off topic, how did you know about the OP's page, when he has'nt given any link yet?
....rather 2 comparison images.

URL is visible in the screenshots would be my guess :)

Drew

rangana
05-09-2008, 09:51 AM
URL is visible in the screenshots would be my guess :)

Drew

Oh yes, I should have been much more observant ;)

FWDrew
05-09-2008, 09:55 AM
Nah, I am just having a good day:thumbsup:

Drew

Volsfan91
05-09-2008, 06:24 PM
Thanks for the help so far guys. It now validates, but still is not working in IE6. :|

I guess if no one has any other ideas, I'll just use a custom stylesheet without the sidebar tonight.

You know, I finally understand why every web designer I talk to hates IE more than anything.

abduraooft
05-10-2008, 08:07 AM
You know, I finally understand why every web designer I talk to hates IE more than anything.
Not quite true. I love IE, especially version 6 for it's ability to recongnise various hacks ;)

Now, in your case, you can't simply blame IE.
Remove all overflow:hidden; properties, as this is not the right way to hide the problems in your layout.

Then try to apply a border around your container, say border:1px solid #fff;
and see where your container resides.

Also, don't apply position:abosolute; or even floats to an element unless you know the exact purposes and side effects.

I'd recommend to adopt a standard layout like http://bonrouge.com/2c-hf-fixed.php and modify (without touching the basic structure) for your needs.

Good luck.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum