]> Fixed CSS bug! « log archives « projekt draco

projekt draco

... is where Sunny Wong writes about nothing in particular and everything in general.


Fixed CSS bug!

I didn’t include Opera when testing for any CSS display problems in this v3.2 layout so I wasn’t aware of a rendering problem of the main navigational bar in the site.

My CSS not rendering well in Opera!

Now I do.

So I had to look at the CSS lines responsible and then see what’s wrong.

#menu { float: left; font: 0.9em Verdana, sans-serif; border-bottom: 1px solid #006699; list-style-type: none; padding: 0; margin: 0; background: #C2CEDA; }

Edited a little and the working line is out.

#menu { float: right; font: 0.9em Verdana, sans-serif; border-bottom: 1px solid #006699; list-style-type: none; padding: 0; margin: 0; background: #C2CEDA; width: 100%; }

Apparently the float: left; made the menu aligned to the left. I wonder why it didn’t in Firefox and Internet Explorer. Changing it to right brought it back to where it should belong.

Wasn't fixed totally yet!

But it wasn’t fixed totally yet.

Then what was needed next was to apply a width: 100%; and voila! The entire menu bar stretched 100% and became what I intended it to.

Fixed!

Happy ending.

And then MSIE 6.0, FireFox 1.0.x and Opera 8 display the same now.

0 comment Post your own »

Add a new comment
Your e-mail will be kept confidential.