Hi there tfit,
you do not need absolute positioning for this project.
Try it like this...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>futureistoday inline scrollbar problem</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html,body {
margin:0;
padding:0;
overflow:auto;
}
#window {
width:80%;
height:160px;
border:3px double #ccc;
margin-top:10px;
margin-left:10%;
overflow:auto;
background-color:#f5f5f5;
}
#window2 {
width:1005px; /* this value is (8x102 - the 'a' width plus border) + (8x21 - the 'li' margin-left plus 21 for the right) */
}
#urls {
margin:0;
padding:0;
list-style: none;
}
#urls li {
margin-left:21px;
padding: 21px 0px;
float:left;
display:inline;
}
#urls a {
width:100px;
line-height:100px;
border:1px solid #000;
display:block;
font-family:sans-serif;
font-size:14px;
color:#fff;
text-decoration:none;
text-align:center;
background:#697210;
}
#urls a:hover {
background:#000;
color:#fff;
}
</style>
</head>
<body>
<div id="window">
<div id="window2">
<ul id="urls">
<li><a href="http://www.google.com/">google</a></li>
<li><a href="http://www.bbc.co.uk/">bbc</a></li>
<li><a href="http://www.nba.com/">nba</a></li>
<li><a href="http://www.w3c.org/">w3c</a></li>
<li><a href="http://reference.sitepoint.com/">sitepoint</a></li>
<li><a href="http://www.codehelp.co.uk/">codehelp</a></li>
<li><a href="http://www.javathinking.com/">javathinking</a></li>
<li><a href="http://www.novell.com/">novell</a></li>
</ul>
</div>
</div>
</body>
</html>
coothead
Bookmarks