![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In comp.infosystems.www.authoring.stylesheets Terry said: I'm trying to have two divs side-by-side, each taking up 50% of the body. Sounds simple enough, right? http://novodom.net/div.html Looks fine in Firefox, but in IE 6.x, the second DIV is below the first one! IE cant do maths. you'll come across it every now and then with different things. Using 49% for each resolves the problem but I wouldn't call that a 'solution'. if your design cant tolerate a 2% variance you're in deep shit |
#3
| |||
| |||
|
|
My design can definitely tolerate it, don't worry. But I'd like to have some feedback from the 'tables-for-layout-must-die' crowd ... how do you suggest getting around that kind of problem? This is exactly why I've stuck with tables until now: some things that take me 2 minutes to do with tables take me hours of fidgeting to achieve with css... arrrgh. Original :: brucie :: 2004-10-30 02:02 In comp.infosystems.www.authoring.stylesheets Terry said: I'm trying to have two divs side-by-side, each taking up 50% of the body. Sounds simple enough, right? http://novodom.net/div.html Looks fine in Firefox, but in IE 6.x, the second DIV is below the first one! IE cant do maths. you'll come across it every now and then with different things. Using 49% for each resolves the problem but I wouldn't call that a 'solution'. if your design cant tolerate a 2% variance you're in deep shit |
#4
| |||
| |||
|
|
I'm trying to have two divs side-by-side, each taking up 50% of the body. Sounds simple enough, right? http://novodom.net/div.html The code validates as XHTML 1.1 Strict. Looks fine in Firefox, but in IE 6.x, the second DIV is below the first one! Using 49% for each resolves the problem but I wouldn't call that a 'solution'. Is there something wrong with my CSS? Can anyone suggest something? Thanks. |
#5
| |||
| |||
|
|
In comp.infosystems.www.authoring.stylesheets Gus Richter said: An alternative is use the Tantek Box Model Hack (or some other) to compensate specifically for IE's deficiency http://tantek.com/CSS/Examples/boxmodelhack.html whereby you give one value for IE and another for others. much easier: blah{width:X;} /* for IE */ blah,[nul]{width:Y;} /* for everyone else */ |
#6
| |||
| |||
|
|
I'm trying to have two divs side-by-side, each taking up 50% of the body. Sounds simple enough, right? http://novodom.net/div.html |
#7
| |||
| |||
|
|
"Terry" <a165287 (AT) yahoo (DOT) com> wrote in message news:7a3cf1b5.0410291857.3c207467 (AT) posting (DOT) google.com I'm trying to have two divs side-by-side, each taking up 50% of the body. Sounds simple enough, right? http://novodom.net/div.html Float the left <div> to the left, float the right <div> to the right. Does that work for your real page? It does for my copy of your test page. |
#8
| |||
| |||
|
|
On Sat, 30 Oct 2004 11:56:44 +0100, "PDannyD" dan1970 (AT) REMOVETHISBITscenicplac...reeserve.co.uk> wrote: "Terry" <a165287 (AT) yahoo (DOT) com> wrote in message news:7a3cf1b5.0410291857.3c207467 (AT) posting (DOT) google.com I'm trying to have two divs side-by-side, each taking up 50% of the body. Sounds simple enough, right? http://novodom.net/div.html Float the left <div> to the left, float the right <div> to the right. Does that work for your real page? It does for my copy of your test page. No, that's not consistent. It works for some settings of the Win-IE window width but not for others. Try to adjust the width of your IE browsing window to find out. |
#9
| |||
| |||
|
|
No, that's not consistent. It works for some settings of the Win-IE window width but not for others. Try to adjust the width of your IE browsing window to find out. Weird! When I resized it previously I must have by chance landed on an even number of pixels a few times. I tried it again with the body width set to 800px and it looked fine. I then set the body width to 801px and the right-hand <div> was below the left-hand div>. So IE6 can't correctly work out 50% of 801px. There's a rounding error somewhere in IE6. It also shows if you use the other example where absolutely positioned elements are enclosed within a relatively positioned element. |
#10
| |||
| |||
|
|
In comp.infosystems.www.authoring.stylesheets Terry said: But I'd like to have some feedback from the 'tables-for-layout-must-die' crowd ... how do you suggest getting around that kind of problem? what problem? its not worth worrying about. how many people are going to come across your page and run away in horror because they notice the halves are 49 and not 50%? you'll probably have margins/padding on the halves so just reduce them to compensate or present 49 to IE and 50 to other browsers. stop trying to be a control freak. |
![]() |
| Thread Tools | |
| Display Modes | |
| |