CodeIgniter Forums
Horizontally scrolling div - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Horizontally scrolling div (/showthread.php?tid=28834)



Horizontally scrolling div - El Forum - 03-23-2010

[eluser]richzilla[/eluser]
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:

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

the divs inside the scrolling div are styled like this:

Code:
.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?

Thanks


Horizontally scrolling div - El Forum - 03-23-2010

[eluser]John_Betong[/eluser]
 
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