PDA

View Full Version : Is this CSS conditional legal?



MrBiggZ
Feb 27th, 2012, 01:37 AM
Hiya!

Is this CSS conditional legal??


#menu a
{
float: left;
height: 25px;
[if !IE] padding: 0 20px;
[if IE] padding: 0 23px;
color: #999;
text-transform: uppercase;
font: bold 12px/25px Arial, Helvetica;
text-decoration: none;
text-shadow: 0 1px 0 #000;
}

It's just a silly difference in IE from the rest of the world that brings me to this point! Grrrrr!! :mad:

Thanks for your help! :thumbsup:

felgall
Feb 27th, 2012, 02:04 AM
No.

You can only use Microsoft conditionals in HTML or JScript - not in CSS.

MrBiggZ
Feb 27th, 2012, 05:00 AM
No.

You can only use Microsoft conditionals in HTML or JScript - not in CSS.

Didn't think so! Just wanted to make sure before I go into 'I hate IE mode!'

Thanks!

VIPStephan
Feb 27th, 2012, 01:24 PM
There is most certainly a way around this but we can’t tell you unless we see the page in action.

MrBiggZ
Feb 27th, 2012, 02:08 PM
There is most certainly a way around this but we canít tell you unless we see the page in action.

No biggie! I put my thinking cap on and spent an extra half hour on it and got my three pixels compensated for it!

I just wish MS would play by the same rules that everybody else plays by and not just their own!