Click to See Complete Forum and Search --> : Height & Width Attr. diff. in IE than in FF?


TheDevilMyself
12-11-2006, 04:52 PM
Hello, i'm more or less done with the page i'm working on and i notice there's a slight difference between the way it displays in Internet Explorer from the way it displays in Firefox... Now, the coding is all mangled crazy to the point where i don't even like looking at it, but lets just say that it goes something like this:

div.example
{
background-color: #000000;
height: 400px;
width: 400px;
overflow: auto;
}

Now the reason i don't post my original code is because it's laced with javascript to make the height and width vary according to screen resolution, but there's discrepencies even without the JS bs. ((note: i know there's probably an easier way to do that, but i'm so tired of dealing with it i'm settling for my current method as of right now))

the page is http://www.motuv.com/about.html and as you'll notice the word "network" wraps to the next line if you're using IE and doesn't if you're using FF. That's just the obvious indicator if you can't tell that the box is different sizes.

I tried putting "margin: 0px;" and "display: inline;" and anything else i could think of but that's not doing it either. html (height & width) is set to 100% and i'm confused as hell. I know that for this particular page it doesn't make much difference, but on others it probably will so i figured i'd get this issue dealt with here and now.

So what's the score here? Am i crazy? How do get these stupid browsers to cooperate?

THanks a mill.

TIM!

_Aerospace_Eng_
12-12-2006, 12:46 AM
Its likely your doctype. Code to standards and you have a better chance of your pages displaying correctly. Code for a good browser like Firefox and tweak for IE.
Change this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
to this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

TheDevilMyself
12-12-2006, 06:18 AM
Yep, that was it - thanks for the tip - it'd probably be up to standards but i do my design in 1st Page 2000 and the new 1st Page is crap unless you cough up the money to register it. (it has a built in typing delay that makes it just incredibly useless)

Again, thank you!

TIM!