How do you design for IE...

Elderly Newt

Senior member
May 23, 2005
430
0
0
...it seems like IE is fairly consistant in doing what I don't want it to do or not doing what I want it to do. My site is perfect (well ok, its not that great, but it displays perfectly) in Firefox. The problems seem to mainly involve CSS. There's nothing site-breaking so far, but just some little things that are frustrating. How do you guys code for IE? Is there some trick I'm missing? Because I find it a little hard to believe that IE can actually be so bad. By the way, yes, I'm using strict mode & I'm coding completely by hand & using IE 7.
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
What CSS components are you using that arent displaying correctly in IE and what version of CSS?
 

skrilla

Senior member
Oct 22, 2004
833
0
71
I guess you kind of get used to it and start to know how things display in each browser.
Sometimes I start with a template and build off of it.

What specifically is messing up?
 

Elderly Newt

Senior member
May 23, 2005
430
0
0
the specifics of the problem that prompted me to post this are:

Im using a top menu system, and the navigation options are divided by vertical lines, so it looks like this:

| abc | def | ghi | jkl | mno |

The vertical lines are absolutely positioned div boxes with a 1px solid left border. This may not be the best way to do this, but it works... Now, between options abc and def, there are two lines right next to each other... and I don't understand how that second line is there. The unwanted line is shorter than the one I want. It's not there in FF.

And another thing that's been bugging me: how do you work around the padding and width/height issue? I don't remember exactly, but it's either that the padding is included in the width/height in IE, or it's not. In any case, it's the opposite of what's done in FF, and it causes the alignment to be slightly off.

I'm not sure what version of CSS I'm using... heh. I'm relatively new to this. I just code the CSS for whatever I want it to do. Am I supposed to declare the version somewhere?
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
that style nav should be an inline list

also, to 'hack' around margin differences and the like for IE versions, do this (after your other styles)
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
This has been a problem for a long time. I haven't specifically compared IE7 to Mozilla, but certainly in IE6 there were a metric asston of cases where IE interpreted the styles one way, and Mozilla another. The only way to get around all of them is to use browser-specific hacks. The other alternative is just to keep things so simple you don't run into a problem. But if you want to have nice flowing layouts, or centered three-column layouts with imaged backgrounds and drop-shadows on the edges, or whatever, the more complicated you get the more of these issues you'll run into. Check out Pagemaker at this site, to see some of the hoops CSS gurus jump through to make it all work right.
 

Kev

Lifer
Dec 17, 2001
16,367
4
81
I thought CSS was supposed to be the new standard for coding web pages. If it is such a pain in the ass to get such a simple thing as a top navigation menu to display correctly, why should people bother with CSS positioning? Why not just use tables?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Originally posted by: Kev
I thought CSS was supposed to be the new standard for coding web pages. If it is such a pain in the ass to get such a simple thing as a top navigation menu to display correctly, why should people bother with CSS positioning? Why not just use tables?

I guess because you can achieve things that you just can't with tables. Have a look at CSS Zen Garden for some examples. But it has long been regarded as a massive mess.
 

Kev

Lifer
Dec 17, 2001
16,367
4
81
Originally posted by: Markbnj
Originally posted by: Kev
I thought CSS was supposed to be the new standard for coding web pages. If it is such a pain in the ass to get such a simple thing as a top navigation menu to display correctly, why should people bother with CSS positioning? Why not just use tables?

I guess because you can achieve things that you just can't with tables. Have a look at CSS Zen Garden for some examples. But it has long been regarded as a massive mess.

I have no problem using it for things you can't do with tables. But people talking about it as being the 'standard' annoys me because it clearly isn't 'standard'
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Well, there is a standard, but as with all standards (in software anyway) it gets interpreted in various ways.