How to hide overflow in this example?

Posted by Abe Miessler on Stack Overflow See other posts from Stack Overflow or by Abe Miessler
Published on 2011-11-30T17:34:11Z Indexed on 2011/11/30 17:50 UTC
Read the original article Hit count: 172

Filed under:
|

You can see the fiddle here: http://jsfiddle.net/easeS/4/

Here is the html/css I have:

#main div
{
 float:left;
 width:30px;
 margin-right:10px;   
}
#main
{
 overflow:hidden;
    width:100px;
    height:50px;
    border:1px solid;
}

<div id="main">
    <div>test1</div>
    <div>test2</div>
    <div>test3</div>
</div>

I'm not sure why but it bumps the third div down to a new line instead of hiding it. Any suggestions?

© Stack Overflow or respective owner

Related posts about html

Related posts about css