On 25/4/05 8:09 PM, "Ingo Chao" <[EMAIL PROTECTED]> wrote: > The problem here is the first rule: you forgot the ";", so a parser > could read this: > > #right { > width: 45%; > border: 1px solid black; > }
D'oh!! > > now you might wonder why this does not fit side-by-side in FF, OP, but > in IE. > > IE/Win has a buggy float implementation. And an element with a dimension > like "#right" is layoutet as a rectangular object which indeed sits at > the right side of the preceding float #left. > > compare IE and FF/Op/Saf: > > #right { > width: 45%; > background: maroon; > } > #left { > float: left; > width: 25%; /* for demonstration */ > background: navy; > } > > <div id="left">Content for id "left" goes here</div> > <div id="right">Lorem ipsum .... put in a long text here so we can see > what happens when the line wraps.</div> > > IE6: the maroon block starts next to the navy float with a a width of > 45% (overall width: 25% + 45%) > > IE5.5: the maroon block starts next to the float, with a width of (45% > of the space beneath the float 75% = 33,75%, overall 25%+33,75% = > smaller than IE6) > > Browsers that follow the specs show: the maroon block and the float > display at the same top left of the containing element. The maroon block > is overlapped by the float, and the line boxes "float" literally. The > overall width of this construct is 45% (smallest). > > Another aspect why I'd vote for floats is that recent browsers do have > some problems calculating percentage widths of a. p. blocks with respect > to their containing block (and not to the parent). > Thanks for your advice! ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************