Previous Message
Next Message

RE: [css-d] How to replaces tables/frames with CSS?

Sent by noah on 29 January 2002 16:04

At 10:24 AM 29/01/2002, RUST Randal wrote:
>Actually, this will work.  I forgot I had already done this once before:

>   #left {
>     position: relative;
>     float: left;
>     width: 20%;
>     background-color: gray; }
>   #main {
>     position: relative;
>     float: right;
>     width: 80%;
>     background-color: red; }

There are probably a thousand reasons why I'm wrong about this, but it 
seems to me that this is where the CSS box model becomes very annoying. 
Because margins / borders / padding are added to the width of the div, 
rather than incorporated into it, you can't add margins / borders / padding 
to either of these divs without this layout breaking, because the total 
width will then be more than 100%.

Previous Message
Next Message

Message thread:

Possibly related: