Jump to content

Vertical Alignment in IE off, perfect in FF


cgm225

Recommended Posts

Thankfully IE has conditional CSS (and only IE). You can implement it like this:

 

<!--[if IE]>
<style>
.class_name
{

}
</style>
<![endif]-->

 

You can use that to override the positioning. This goes in the <head> section after any other CSS.

Any non-hack options?

 

Conditional comments (which is what jordanwb showed you) aren't hacks, they are just comments. IE however, has been set to read these comments as if they were code.

 

In this case, they are your only choice. In other cases, there are ways around using them, such as using padding on a parent element rather than margins on a child element. But such is not the case this time.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.