IIS7 Rewrite
IIS7 Rewrite

Reputation: 799

Tables in IE7 displaying inline

I have two tables in ie7 inside a div. The div has a width property set to 500px. The tables are inside the div and have (each) a width property set to 450px.

When the page is rendered in IE7, the second table displays next to the first table (same line) even though the parent div has a width of 500px, which is not being respected.

This displays ok in all other browsers.

How can I tell IE7 to display the second table below the first one?

Upvotes: 0

Views: 119

Answers (3)

V15HM4Y
V15HM4Y

Reputation: 1805

For achieving cross browser compatibility in you case, you can html5shiv.js which you will find here. I have used it in most of my projects for cross browser compatibility. Hope this will help you.

Upvotes: 0

Janak
Janak

Reputation: 5052

Here's another workaround ...

1) Put a <br/> tag after the first table. This will always display 2nd table below the 1st one.

2) Add <div style="clear:both"> </div> after the first table. This will do the same as above.

Upvotes: 0

clu3Less
clu3Less

Reputation: 1882

Use

<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="ie7.css">
<![endif]-->

Create a small hack in CSS targeting only IE7.

For Your Reference IE Only CSS

Upvotes: 1

Related Questions