Accessibility

CSS Advisor

Duplicate indent bug

by CSSAdvisorAdmin on October 31, 2006
Edited by: Amy C Taylor on September 11, 2010
Avg Rating 4.0 (2)   |   Log in to rate post.

Tagged with Margin , Explorer 6.0 , Explorer 5.0 , Text , Explorer 5.5 , Float , Explorer for Mac

Problem

When a margin is applied to a floated box on the opposite side as the direction the box is floated AND the floated box is followed by inline content (images, inputs, or text outside a <p>, for example), the first line of inline content will be indented by the same amount as the margin.

Solution

Specify display: inline; for the affected float.

Detailed description

Due to Internet Explorer/Windows' strange rendering of margins on floated elements, this bug can cause inline elements (such as text or images) in adjacent divs to appear indented from their expected position. This is definitely an IE 6-and-earlier bug, which does not reproduce in other standards-compliant user agents. Note that IE only applies these unnatural indents to inline elements. When the affected elements are wrapped in paragraph or div tags - also more common than raw text - the bug does not reproduce.




Text ID: DUPLICATE_INDENT_BUG



Comments (0)

To add a comment, please Log in.








CSS Advisor home
Submit a post

rss

CSS ADVISOR RSS FEEDS
Recent: POSTS | COMMENTS | EDITS


Browsers
Internet Explorer (103)
Mozilla/Firefox (52)
Opera (18)
Safari (38)
CSS Properties
Background (25)
Border (10)
Color (10)
Float (23)
Font (6)
Margin (11)
Padding (9)
Position (40)
Text (30)
Width/Height (27)