|
|
|
|
|
by Groxx
5525 days ago
|
|
Like this: #left{
float:left;
width:200px;
margin-right: -200px;
}
#right{
float:right;
width:200px;
margin-left: -200px;
}
#middle{
float: left;
margin-left: 200px;
margin-right: 200px;
}
People tend to avoid this relatively simple solution because of the double-left-margin bug in IE 5 & 6, but that's getting to be an excessively old set of browsers. And even then, it's usually fixed with a "display:inline;" on the ones with left margins.edit: it's not an ideal solution, as it has those negative values which have to match the related positive ones. Which is solved with something like Sass or Less, because CSS lacks any "programming" abilities, which I see as its main failure. Even variables and simple math would be acceptable, but instead, nothing. |
|