0

I am restructuring my tabular format data to show in divs. When I am assigning a css display:inline-block;, the divs are displaying side by side in IE8 but in IE6, its coming downwards.

Please help.

Thanks in advance.

mskfisher
  • 3,291
  • 4
  • 35
  • 48
smukh
  • 81
  • 1
  • 12

2 Answers2

4

To make display: inline-block work in IE6, use this:

selector {
     display: inline-block;
     *display: inline;
     zoom: 1
}

Why does this work? See: Inline block doesn't work in internet explorer 7, 6


I am restructuring my tabular format data to show in divs.

I have to agree with the other comments - that is a bad idea.

You should use a <table> for tabular data - that's what they're for, semantically!

Community
  • 1
  • 1
thirtydot
  • 224,678
  • 48
  • 389
  • 349
  • Actually, in my current page, the div above the tabular data is not showing any scrollbar. So I was advised to convert the tabular data to divs, the header as a separate header div and the data table as a separate div. If there is a way to show a scrollbar on the table's parent div, I would be more than happy. – smukh Jun 01 '11 at 05:17
0

You have to use display: block; float: left to achieve that in IE6. But be aware of the box-model problems with IE6 and the usage of width and padding.

But as a side note, if you have real tabular data, you should use <table>. There is no need to switch to <div> for that task.

DanielB
  • 19,910
  • 2
  • 44
  • 50
  • Actually, in my current page, the div above the tabular data is not showing any scrollbar. So I was advised to convert the tabular data to divs, the header as a separate header div and the data table as a separate div. If there is a way to show a scrollbar on the table's parent div, I would be more than happy. – smukh Jun 01 '11 at 05:18
  • You should have had this information within your question. You could set the table parents div to a fixed height i.e. `height: 600px` and `overflow-y: scroll`, so the table parents div will have a vertical scrollbar. – DanielB Jun 01 '11 at 07:55