Here is my code
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style type="text/css">
#image_container
{
position:absolute;
top:100px;
left:0px;
height:420px;
}
.folder_image
{
background:url(folder.png) top no-repeat;
width:679px;
height:420px;
top:0px;
left:0px;
position:relative;
float:left;
margin-right:50px;
}
</style>
</head>
<body>
<div id="overflow_container">
<div id="image_container">
<div class="folder_image"></div>
<div class="folder_image"></div>
</div>
</div>
</body>
</html>
This is what I am trying to achieve : As and when I add new divs
with the class folder_image
, the divs should sit one next to each other horizontally. I know that this can be done by setting the width of the parent container , #image_container
in my case , but how do I do it without setting the width
of #image_container
Thanks in advance.