Content scrolls horizontally?
hi all
I have this problem that I know is simple but I can’t work it out.
This is a stripped down version of what I have - http://www.ttmt.org.uk/
If you scroll right over the content (centre of the page), the page scrolls slightly with a scroll bar at the bottom
Why is it scrolling? How can I fix it?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="robots" content="noindex, nofollow" />
<title></title>
<style type="text/css" media="screen">
*{
margin:0;
padding:0;
}
#wrap{
margin:0 auto;
width:1020px;
}
#content{
overflow:auto;
margin:0 0 80px 0;
}
#content h1{
margin:20px 0 20px 0;
}
#content .Display{
margin:0 0 15px 0;
}
#content #leftCol{
float:left;
width:675px;
}
#content #leftCol img{
margin:0 0 15px 0;
}
#content #rightCol{
float:right;
width:330px;
}
#content #rightCol #firstBtn {
border-top:1px solid #444;
}
#content #rightCol .sideNavBtn {
border-top:1px dashed #444;
cursor: pointer;
float: left;
padding:14px 10px;
width: 330px;
}
#content #rightCol .sideNavContent {
width: 330px;
float: left;
background: #f5f5f5;
}
#content #rightCol .sideNavContent p{
font:.96em/1.3em Helvetica, sans-serif;
padding:10px 10px 20px 10px;
}
</style>
</head>
<body>
<div id="page">
<div id="wrap">
<div id="content">
<h1>Title</h1>
<div class="Display">
<img src="1.png" />
</div>
<div id="leftCol">
<img src="sample.png" />
</div><!-- #leftCol -->
<div id="rightCol">
<div id="sideNav">
<div class="sideNavBtn" id="firstBtn">Link One</div>
<div class="sideNavContent">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede </p>
</div><!--sideNavContent-->
<div class="sideNavBtn">Link One</div>
<div class="sideNavContent">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede </p>
</div><!--sideNavContent-->
<div class="sideNavBtn">Link One</div>
<div class="sideNavContent">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede </p>
</div><!--sideNavContent-->
</div><!--sideNav-->
</div><!-- #rightCol -->
</div><!-- #content -->
</div><!--wrap-->
</div><!-- #page -->
</body>
</html>