Block elements next to floating elements

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Block elements next to floating elements

Post by superdezign »

Attempting to Google this has been hell, so I've decided to simply ask.

How would one force a block element to end before a floating element? By default, block elements extend as far as they can, causing them to be partially covered by by the floating element. However, a client wants his headers to be in rounded boxes, but wants those rounded boxes to end next to a floating image rather than behind the image. I'm completely stumped as to how I would do this.

Any suggestions?
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: Block elements next to floating elements

Post by kaszu »

I would use display: inline-block; or float
If it doesn't work, can you post a screenshot or url?
Post Reply