homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

css2 positioning problem
box div float help

 1:33 pm on Nov 21, 2002 (gmt 0)

I'm going out of my mind trying to get ie6 and netscape6 to agree with fixed width divs, the problem is the usual ie6 not adding padding, border, margin widths to the actual width but I've tried various workarounds and they dont work!
I have a fixed width div for the menu floating left which is fine (no margins, border etc) and a larger div (with margins etc) for the the main content floating right, ideally these two divs would be 10px apart but I just cannot get them the same in both browsers, I've tried that "voice-family: "\"}\""; " nonsense and it isn't working! this is really driving me mad, I should be used to this by now!
why cant ie and netscape just get along for once...



 1:56 pm on Nov 21, 2002 (gmt 0)

I don't really find I really have that issue with V6 browsers Maybe you are doing something else that is causing the trouble?

Have you Validated your CSS [jigsaw.w3.org] to check for errors and warnings? Always a the first port of call for me ;)



 2:08 pm on Nov 21, 2002 (gmt 0)

IE6 is known to have bugs with regards to rendering floating divs. I haven't been able to get it to play nice either - which is extremely strange since IE 5.5 sees everything fine (as do Op6 and NN 6.02).


 2:19 pm on Nov 21, 2002 (gmt 0)

Wander over to google and search for "IE6 float bug" and or "guillotine". You should find some nice resources quickly. You may also want to check
Flex HTML [flexhtml.net] and I believe Evolt has a few articles about similar problems.

Depending on your DTD, IE6 may use the old quirky rendering engine, which if I understand correctly, uses IE 5's incorrect box model. You may try changing the doctype to see if it makes any difference, or if find you are using the quirky model, and then use the Tantek hack to make sure your boxes are sized correctly.

And of course--which version of Netscape 6 are you using? 6.0 doesn't like much of anything.


 2:27 pm on Nov 21, 2002 (gmt 0)

Are you using a DOCTYPE in your HTML file? IE6 renders in standards mode [msdn.microsoft.com] only if you have DOCTYPE declared in a certain manner.


 2:31 pm on Nov 21, 2002 (gmt 0)

ok, I've changed the doctype, and it seems to have worked, I'm not sure why but at least I'm getting somewhere..


 3:04 pm on Nov 21, 2002 (gmt 0)

What was the doctype and what is it now?

And did it validate with the old doctype?



 3:30 pm on Nov 21, 2002 (gmt 0)

doctype went from;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I dont know enough about dtds to know why this worked but it did!


 5:06 pm on Nov 21, 2002 (gmt 0)

A couple of things come to mind here:

1. Did you actually change your code from HTML to XHTML, and not just switch the doctype? If the syntax is not really XHTML, you'll probably run unto trouble on some browser or other.

2. HTML 4.0 was probably not what you wanted at any rate - HTML 4.01 was introduced in 1999 and would be more compatible CSS-2 features.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"


 6:53 pm on Nov 22, 2002 (gmt 0)

wow this has really opened a can of worms for me!
I've read various resources on doctypes and apart from my brain hurting, I really don't know which doctype to use. if I use 4.01 transitional with a uri the css2 positioning stuff works but other buggier stuff doesn't. The site I'm building doesn't necessarily have to be standards compliant so what should I do. plus the uri linking to the w3 page can actually link anywhere or contain complete nonsense and still work, so whats the point?
I can't believe that not only do I have to wrestle with 47 different browser types on 14 different platforms (ok 2 actually) I now have each browser behaving differently according to which doctype I use!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved