Jump to content

using style for IE only


SmokingMan

Recommended Posts

My formatting renders fine in Opera and FF, but not in IE 7 (surprise, surprise, surprise). I need to add some padding for IE only. I know there's a way to hide styles from everything but IE using something like "if ie" in the stylesheet. But I can't remember the syntax and how to use it. I don't need the padding for any browser other than IE, so I want the line "padding-bottom: 10px;" line to only be picked up by IE and ignored by everyone else. Can someone please refresh my memory on this? I've tried to search the forum, but I can't find anything. :)

Link to comment
Share on other sites

Try
<!--[if IE 7]>	   <style>	   /* Insert CSS Here */	   </style>	   <![endif]-->

I tried every variation I could think of. The padding I wanted for IE worked, but the rest of the style for that element is lost for all three browsers. There has to be a way other than using a script to check for what browser is being used and loading the appropriate stylesheet, isn't there?Here's the page: click here.Here's the CSS:
   .order-heading{	   font-family: 'Trebuchet MS',Verdana,Tahoma,Arial,'Arial Black',Helvetica,'Century Gothic','Lucida Sans Unicode',Impact,sans-serif;	   text-align: center;	   font-weight: 800;	   color: #660000;	   font-size: 16px;	   text-decoration: none;	   width: 100%;	 }	 	 .order-instructions{	   font-family: 'Comic Sans MS','Monotype Corsiva',cursive;	   font-style: italic;	   font-weight: 400;	   font-size: 13px;	   color: #660066;	   text-align: justify;	   text-decoration: none;	   margin: auto;	   width: 90%;	 }

The "order-heading" class is where I want to add "padding-bottom: 15px;" for IE only. FF & Opera render this just fine.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...