I have an image wrapped by 2 or 3 divs. The divs are styled in certain ways by the user with buttons. To keep the divs hugging the image, i set them to display:inline-block. That works fine in all browsers except for IE, which is keeping them block elements (they stretch the whole width of the parent).
Any ideas on how I can get the divs to act like they’re inline-block like they’re supposed to?
I have an image it’s wrapped in a div. The div needs to fit around the image with no spaces. You do that by telling the div to display inline-block. However, IE has a problem changing block elements into inline-block elements.
The only solution I’ve come up with so far is to switch out the divs with an inline element, like a span, because IE doesn’t have a problem changing inline elements to display inline-block. But that’s actually more work than it sounds for several reasons and I’d like to avoid it if possible. I’m hoping there’s a CSS solution.
Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘CSS’ is closed to new topics and replies.