PDA

View Full Version : horizontal inline <div> stacking


{rik}
03-27-2006, 02:41 PM
Hi,

I'm trying to get four <divs> to flow horizontally (http://www.student.city.ac.uk/~abbf950/dwls/blah.jpg) accross the page with a 30 px margin in between them. However, I can only get them to stack vertically. I have no idea why and can't seem to be able to find any info to sort myself out. Here's my code (http://www.student.city.ac.uk/~abbf950/dwls/Untitled-3.htm).

Does anybody know if this is possible in css?

Many thanks,

Rik

orcrist
03-27-2006, 02:48 PM
you cant have it both ways display:block inline;
remove all that, remove position absolute/position relative, give em float,and it should be fine:
#container
{

width: 1000px;
height: 500px;
background-color: #FFF00D;
}


#tabbox
{

width: 150px;
height: 140px;
background-color: #FF0000;
margin: 20px 0 0 30px;
font: trebuchet ms, arial, sans-serif;float:left;}