I have a div tag which is a main container and inside I have three more. now what I want to do is to put them to the right of everyone. I mean one div will be at the left side one in the middle and the third one on the right. but the only div which will be visible is the left first and the rest of them will not be visible. I used overflow hidden but not working.
here is my code. Please tell me what am I doing wrong.
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<style>
body {
margin: 0;
}
#header {
width: 100%; height: 50px;
background: aqua;
}
ul {
list-style: none;
margin: 0;
}
ul li {
float: left;
margin-right: 30px;
}
#contents {
width: 100%; height: 600px; overflow: hidden;
background: lightblue;
}
.contentsWrapper {
display: block;
width: 100%; height: 300px;
}
#contentsOne { background: red; }
#contentsTwo { background: blue; }
#contentsThree { background: grey; }
</style>
<title>title</title>
</head>
<body>
<div id="header">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">FAQ</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
<div id="contents">
<div class="contentsWrapper" id="contentsOne">One</div>
<div class="contentsWrapper" id="contentsTwo">Two</div>
<div class="contentsWrapper" id="contentsThree">Three</div>
</div>
</body>
</html>