Threads Of Being

Of the Heart and of the Mind. Three point one four one five nine.

Thursday, September 16, 2004

HTML/css in Netscape and IE 

YAY! I finally figured it out! :D

I've known for a long while that Netscape and IE display percentages differently, such as if you say font-size:80%; that will appear as different sizes in the different browsers, or if you say width:25%; that will appear differently in the different browsers. Instead you have to specify exact pixel sizes for the two browsers to display the same. (In the examples above that would be font-size:8px; and width:200px; as examples.)

But I had still be having spacing issues with the two browsers. And in trying to make this blog design the same in both I discovered the elusive problem. Height! Netscape and IE render height attributes differently, even if you define specific pixel sizes. It's actually a bit more complicated than that, dealing with one browser always forcing things to the height specified and the other browser ignoring the height specified when other things start conflicting. But basically, if you simply don't use any height attributes and instead use a combination of margin, padding, and vertical-align attributes both browsers will behave the same.

You have no idea how happy I am over figuring this out. :)


Hiya -- what a good job you did with your blog!

Between you and Dave at Dave's Grab Bag, I'm learning a lot! It'll be long time before I actually do a whole page though... I'm just so impressed by what you've done! Congrats :)  
Thanks muchly! I'm glad you're learning too. Designing your own websites can be a lot of fun.  
Yeah I really like your notebook page =)
I cheated on mine =(

Oh well perhaps I'll revamp it again when I get tired of green. (may be a while tho,... I like green =P )  

Post a Comment

This page is powered by Blogger. Isn't yours?