This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > March 2007 > display: inline-block on IE





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author display: inline-block on IE
Jukka K. Korpela

2007-03-31, 4:18 am

Sub titulo "Re: Checkbox multi column alignment"
cripsit Ben C:

> Has display:inline-block, as specified by CSS 2.1, ever worked on any
> or any other day, even for a page containing the string "42", in any
> version of IE, ever?


Surely. The magic needed is not very magical in this case: you need to set
the width of the element. The main problem with display: inline-block on IE
is that the width incorrectly defaults to the available width.

This of course defeats much of the potential use, but display: inline-block
still partially works on IE. You can test this e.g. by using <span> markup
for some word in a paragraph and setting a width for it, and perhaps
background or border to make the width easier to see. IE will correctly
ignore the width setting, since <span> is by default an inline element. When
you set display: inline-block, the width starts working, as specified, and
the element still appears inline.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews