smartalco Posted February 1, 2010 Share Posted February 1, 2010 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? Link to comment Share on other sites More sharing options...
Ingolme Posted February 1, 2010 Share Posted February 1, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.