html - IE6 CSS display:table fix? -



I am working on a web app ... unfortunately it works with the worst piece of software To do is written, yes ie6.

I like the CSS display: table and display: table-cell properties, but of course it does not work, that is to say.

Has anyone found any fix for this? I was watching, but nothing has been found.
Conditional CSS, .htc files, javascript ... anything?
I really want to save from making everything with floats and clean it

Sorry There is no fix in creating the IS6 support CSS display: table . In IE6 the only way to get this layout is to actually & lt; Table & gt; Use the elements.

The first question: Do you really need to support IE6? If you can leave support for this, you will solve a whole problem, including this one. The current global usage of IE 6 is below 3%, and is also lower in more developed countries.

If you still need to support IE 6, then your most obvious solution is simply to swallow your semantic markup pride and just use a tag.

As described by @Tom, next best solution is display: inline-block; .

Inline-Block allows you to define your elements as blocks, but they still have text flows (slightly like & lt; img & Gt; tag works by default) If you add it to the width of the fixed element, and given around the rows, you can get something similar to the table, although it can be difficult to expand dynamically with page width.

A big "catch" bug around it is that inline block works only in IE6 / 7 for those elements whose default style is display: inline < / Code>. In other words, this & lt; Span & gt; , but & lt; Div & gt; Not for . No disaster, but be aware of it, especially when you are specifically asking about IE6 support. Besides, the good news is that you can use any other hacks using display: inline-block . Or be able to do without work-annex.

Comments