Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- How can I make my image not go outside the margins?


rocknbil - 9:25 pm on Aug 28, 2007 (gmt 0)


If there are no floated items in the document preceding the parent div, use a clear as above. But if there *are* floated items in the document preceding the div, it will clear all the way to the bottom of them, forcing "this div" below them all.

Simplest first is play with overflow on the parent div as suggested - but if this is in a complex layout, you can contain the floated image by floating the parent div because floated elements will always clear to all their children.

Recent nightmare with containing elements [webmasterworld.com]. :-)


Thread source:: http://www.webmasterworld.com/css/3434338.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com