Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: not2easy
I am creating a site that so far is pure CSS for the styling and all the content is contained in a few divs.
I have made parts of my page fixed as far as positioning and font size. Now before anyone gets upset, the fixed fonts (in px) are already large and are in locations where I don't want them to resize larger or smaller.
The right hand side of my page is fluid and the main content can be resized on the client side.
My confusion is how Netscape and IE are handling the box model differently.
There are several differences when I view Netscape 6.2 and IE 5.5. One example is a banner that is fluid but the font is fixed. When the screen is resized smaller the text and the box move together and it looks OK In IE 5.5. In Netscape 6.2 the text moves the same but it is outside the box, the box doesn't resize vertically. My question is which uses the correct box model and how can I have both browsers resize both the box and the text?
You can do a site search for "box model" and find many references and solutions.
As far as your text not wrapping within your <div>, do make sure you are assigning unit identifiers for the width declaration. You need to use unit identifiers for ALL values greater than 0 (zero), e.g. 180px, 80%, 6em, and so on.
I kinda figured that IE was hosed but is working the way I want it to. Come to think of it (the light bulb just turned on) I had set the height to px and the width to %. I need to set the height to %.
Just goes to show how hosed IE is when it is resizing my set 100px height banner. Since I tested first in IE I was confused and forgot that my height was fixed since it wasn't being fixed by IE.
Any guidelines for when to use percentages vs. pixels, etc?
Sheesh! I've either got to accept the rule of thumb or start popping Advils. I'll go with the rule of thumb.
This is kind of weird. Lets say the container is the body. Based on screen sizes and other things, some bodys will be relatively tall & skinny as compared to others that are relatively short and wide. Using the percentage format for a top margin would push the element further down on the short and wide screen and keep it higher up on the tall and skinny. Just the oposite of what one might expect (and want), no?
As for me, I have to test them in different browser, they all have their flaws, specially when specifying length as auto or not putting the property at all.
happy tweaking! :)
This is kind of weird. ...
You're right -- that's weird, and I never noticed it before.
My other rule of thumb is to avoid relative values such as % and em on heights. ;)
I think it's because I read this [richinstyle.com] early on as I was learning CSS.