Welcome Guest, Not a member yet? Register   Sign In
Horizontally scrolling div

Hi all, im attempting to make a div scroll horizontally on the page, depending on the amount of content it contains. As far as i can tell, this should work:

.house-view .content
    float: left;
    margin-left: 20px;
    width: 615px;
    overflow-x: scroll;

the divs inside the scrolling div are styled like this:

.house-view .content .house
    float: left;
    margin-right: 5px;
    width: 55px;

But the .content div never scrolls. When it is full, all of the .house divs just break onto a new line. Can anyone tell me where im going wrong?


Your question would be better suited to http://www.sitepoint.com/forums/forumdisplay.php?f=53 where you will find numerous experts to solve your CSS problems.

I would first run your HTML output script through a validator and ensure you have no errors or warnings first.

Without checking I believe overflow-x: scroll; is browser specific and the correct term is overflow: auto;

Also try setting background:cfc none; to ensure that your div is actually receiving the CSS script.
edit: spelling

Theme © iAndrew 2016 - Forum software by © MyBB