Forum Moderators: not2easy

Message Too Old, No Replies

Star HTML hack still in effect in IE7?

         

littlegiant

6:17 pm on Aug 22, 2007 (gmt 0)

10+ Year Member



Am I losing my mind or is the star selector hack still in effect in IE7? Or has my installation of IE7 become corrupted or something?

I'm seeing red text in the following test case scenario:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>

<style type="text/css">
div {color: green;}
* html div {color: red;}
</style>

</head>
<body>

<div>TESTING</div>

</body>
</html>

Setek

12:00 am on Aug 23, 2007 (gmt 0)

10+ Year Member



Yeah, IE 7 still renders the star hack.

They decided to keep it in for legacy support or something :)

encyclo

12:41 am on Aug 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The star hack only works in quirks mode, due to your incomplete doctype. In standards-compliance mode, IE7 should behave according to the specifications (and like other browsers). See:

  • Improving the CSS 2.1 strict parser for IE 7 [blogs.msdn.com] (IEBlog)
  • FAQ: Choosing the best doctype for your site [webmasterworld.com]
  • littlegiant

    2:51 am on Aug 23, 2007 (gmt 0)

    10+ Year Member



    Oh okay thanks. Didn't know that.