Jump to content

Conflicting Normal And Float Divs


smartalco

Recommended Posts

Alright. I have 2 divs in this image, one of them has float:right applied, along with an 8px margin. The other, coming later in the code, has a set height, but an unset width. I've outlined where the second div edges should be in my mind, and have pointed to the part that shows it is still extending right (the line is part of the background image). How exactly does one force other divs to behave as the text (contained in a <p> tag) does?picture3hj.png

Link to comment
Share on other sites

That's how floating elements work. You can either add clear: both; to make the header go under or you can give the header a right margin as wide as the floated div.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...