Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

here is my code..can i target IE7 within my css?

Status
Not open for further replies.

suzisweet

Programmer
Aug 25, 2006
38
0
0
GB
Hi all,

I am one of many who is looking for cross browser consistency in the display of their sites.

I have used hacks to target IE6 and firefox like below:

first IE6 reads this:

Code:
h2 { width: ??px; }

In the same stylesheet firefox etc reads this:

Code:
/* ignored by IE */
*>h2 { width: ??px; }

Can i add another hack to target IE7?

thanks in advance for any reply..

suzi
 
Why would you want to? Technically IE7 is closer in compliance, so it should render fine.

Perhaps your example is too simple, but I doubt IE6 will have any problem actually applying a correct width to an h2 tag anyway.

What exactly are you trying to get around of by using those hacks?

Maybe we can provide a better method, that does not involve a hack.


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
It is preferred to use IE conditional comments to target IE specific stylesheet issues to employing hacks. However, as vacunita pointed out, you should not need too many IE7 specific commands. If you do, you might be doing things wrong.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top