P
Paul F. Johnson
Hi,
I'm trying to replace a table with a three and four column display (the
material on the page uses a pile of nested tables for layout which is
just plain bad IMO - but hey, Dreamweaver can't be wrong can it ;-p)
So far, my CSS looks like this
#container {
position: relative;
width: 770px;
margin: auto;
padding: 0;
color: #000;
border: #443b2c 1px solid;
text-align: left;
}
#content {
position: relative;
}
#col-left {
position: absolute;
padding: 5px;
width: 260px;
left: -275px;
background-color: white;
}
html>body #col-left {
left: 0px;
}
#col-middle {
margin-left: 270px;
width: 240px;
padding: 5px;
background-color: white;
}
#col-right {
margin-left: 521px;
width: 250px;
background-color: #ddd;
}
(the four blocks are similar)
col-left and col-middle display happily next to each other (as so block1
and block2), but col-right (and block3) displays under (but to the
right) of col-middle. block4 repeats this, it's to the right of block3,
but under it. In other words, they look like steps!
I can't upload the page and CSS anywhere as I'm having network problems
at work, however, in ASCII art...
| col-left | col-middle |
| col-right |
and
| block 1 | block 2 |
| block 3 |
| block 4 |
Any ideas on where I'm going wrong here?
HTML looks like this
<div id="container">
<div id="header">
<img src="headerpic.jpg" alt="Some description" width="770px"
height="81px" />
</div>
<div id="content">
<div id="col-left">
// blah blah blah
</div>
<div id="col-middle">
// more blah blah
</div>
<div id="col-right">
// links n stuff
</div>
</div>
</div>
The page I'm working on and the complete stylesheet validate okay
TTFN
Paul
I'm trying to replace a table with a three and four column display (the
material on the page uses a pile of nested tables for layout which is
just plain bad IMO - but hey, Dreamweaver can't be wrong can it ;-p)
So far, my CSS looks like this
#container {
position: relative;
width: 770px;
margin: auto;
padding: 0;
color: #000;
border: #443b2c 1px solid;
text-align: left;
}
#content {
position: relative;
}
#col-left {
position: absolute;
padding: 5px;
width: 260px;
left: -275px;
background-color: white;
}
html>body #col-left {
left: 0px;
}
#col-middle {
margin-left: 270px;
width: 240px;
padding: 5px;
background-color: white;
}
#col-right {
margin-left: 521px;
width: 250px;
background-color: #ddd;
}
(the four blocks are similar)
col-left and col-middle display happily next to each other (as so block1
and block2), but col-right (and block3) displays under (but to the
right) of col-middle. block4 repeats this, it's to the right of block3,
but under it. In other words, they look like steps!
I can't upload the page and CSS anywhere as I'm having network problems
at work, however, in ASCII art...
| col-left | col-middle |
| col-right |
and
| block 1 | block 2 |
| block 3 |
| block 4 |
Any ideas on where I'm going wrong here?
HTML looks like this
<div id="container">
<div id="header">
<img src="headerpic.jpg" alt="Some description" width="770px"
height="81px" />
</div>
<div id="content">
<div id="col-left">
// blah blah blah
</div>
<div id="col-middle">
// more blah blah
</div>
<div id="col-right">
// links n stuff
</div>
</div>
</div>
The page I'm working on and the complete stylesheet validate okay
TTFN
Paul