Mysteries of CSS still abound

It seems I don’t know enough CSS. This is really funny as I tend to do css really good. Only one better is Emil who usually does CSS. However sometimes there are some small or not so small project that required tweak here and there.

What really got me confused is that aside from handling margins and padding, IE and others should be more or less the same, or I tend to believe that. Well, I made perfectly good menu that worked extremely well, except that for no apparent reason, a div above it would overlap it, in IE only. I tried all regular and natural and usual ways to get around it and it wouldn’t budge. If I increase size so it wouldn’t overlap in IE, I would have really ugly stripe of white in other browsers.

Finally what worked is that I added a border to menu the same color as bottom menu and then tweaked size until everything matched. Why this works, is totally beyond my comprehension, hence conclusion that I probably don’t know css as much as I believed to do.

Here it is, with few extra lines removed. This is as plain as can be.

#logoWrapper{
    background-color: #FFCC33;
    height:96px;
    }

#topmenu {
    border-top:6px solid black;
    background-color:#000000;
    color: white;
    height:26px;
}
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s