Tag Archives: customization

internet explorer stylesheet conditionals make your page dissapear

Why not? That’s logical, isn’t it?

No, relax. I am not sure if this is a general problem or it happened only to me. But of course where there is a problem, there is a solution.

In my case, I was modifying an existing wordpress theme for a client and the homepage design required some explicit design. All worked well until tested in IE7. Layout broken… well, let’s fix them with ie specific stylesheets… but, fixing it made the page dissapear… Great fix Zisi…

What was the problem in my case? Further above inside the <head> tag, there was another IE conditional, exactly the same as  I used to fix my broken layout. The theme was using it for its own purposes. Luckily I got the idea to put the IE specific stylesheet inside this first IE conditional, thus removing the second conditional.

Confused? Long story short…. if there is for example already a IE conditional statement, for example <!–[if lt IE 8]> …. <![endif]–>, don’t use again exactly the same conditional to import your IE specific stylesheet. Place it inside the already existing conditional.

Maybe someone else who is heavily modifying existing wordpress themes will find this useful. Maybe not. Either way, knowledge shared :).