/* CSS */
body { background: url(images/background.png) repeat-x;
}
#topcolumn {
position: absolute;
height: 140px;
width: 860px;
border: 1px solid #000000;
}
#leftcolumn {
position: absolute;
top: 155px;
height: 600px;
width: 170px;
background: url(images/column.png);
border-top: 1px solid #000000;
}
#centrecolumn {
position: absolute;
width: 500px;
height: 650px;
left: 189px;
border-top: 1px solid #000000;
top: 155px;
background: url(images/content.png);
}
#rightcolumn {
position: absolute;
left: 700px;
top: 155px;
height: 600px;
width: 170px;
background: url(images/column.png);
border-top: 1px solid #000000;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title</title>
<meta http-equiv="Content Type"
content="text/html; charset=utf-8" />
<link href="style1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="topcolumn">
</div>
<div id="leftcolumn">
</div>
<div id="centrecolumn">
Test
</div>
<div id="rightcolumn">
</div>
</body>
</html>
Phaser said:Whatever padding you add, don't forgot to take the exact same amount off the overall width.
The column the padding is going into. For example, if you add 10px of padding to all sides of "column-a", then the space that "column-a" takes up will increase by 20px (10px each side).Slogan said:By overall width, do you mean the column that the padding is going into or all the columns on the page?
*, html, body{margin: 0; padding: 0;}
#leftcolumn ul{list-style: none;}
#leftcolumn h3{padding: 10px 0;}
<div id="leftcolumn">
<h3>Navigation</h3>
<ul>
<li><a href="#">Home</a></li>
</ul>
<h3>News</h3>
<ul>
<li><a href="#">General</a></li>
<li><a href="#">Technology</a></li>
<li><a href="#">Sport</a></li>
</ul>
<h3>Entertainment</h3>
<ul>
<li><a href="#">Music</a></li>
<li><a href="#">Movies and TV</a></li>
<li><a href="#">Gaming</a></li>
</ul>
<h3>IYO</h3>
<ul>
<li><a href="#">Forums</a></li>
<li><a href="#">Blogs</a></li>
<li><a href="#">POTW</a></li>
<li><a href="#">Affiliates</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
LazyManc said:If you're using an unordered list, then you don't need the <br /> (and shouldn't use it as it's incorrect) as it will place each list item on a new line by default.
Mr_L said:I think this is what you want, and this is what is does: