views:

161

answers:

3

What keeps a div from extending horizontally past the edge of the screen when there are horizontal scroll bars?

The DIV's content will overflow out to the left but not the DIV itself.

What can make the div go all the way to the right?

Thanks

A: 

I'm not sure I completely understand your question, but I'd look into the CSS overflow-declaration: http://www.quirksmode.org/css/overflow.html

Tommi Forsström
A: 

see if adding the clearfix class solves your problem, here's some information:

http://www.webtoolkit.info/css-clearfix.html

John Boker
I understand clearfix. This is something different.
Ronnie Overby
+1  A: 

For the div to expand out of the view pane you need it to have a width. If it doesn't have a width then it takes the width of it's container. When content is bigger than it's container (the div or body, etc.) then it behaves according to overflow, the default being visible.

options are:

overflow: visible;
overflow: hidden;
overflow: auto;
overflow: scroll;

http://www.w3schools.com/Css/pr_pos_overflow.asp

Steve Perks