New CSS commands for Internet Explorer 7  PDF Print E-mail
Tag it:
Delicious
Furl it!
Digg
NewsVine
Reddit
YahooMyWeb
Technorati
Articles Reviews CSS
Written by Adi Bach   
Monday, 12 February 2007

{mos_sb_discuss:19}

There are a small handful of new CSS commands that you can now use for Internet Explorer 7. Well, they're not really new - most other browsers have supported them for a long time and IE is only just catching up. These new commands basically give you more control over HTML elements and eliminate the need to use classes or ids in a lot of instances.


  
Once IE6 becomes outdated you'll be able to use the commands outlined in this article. Actually, that's not strictly true - provided that your website doesn't rely on these commands and is still legible in IE6 and before then there's no problem using them.

Child selector

Despite Internet Explorer 6 not supporting the CSS child selector, it's actually been used a lot as a way of hiding CSS commands from Internet Explorer. This is no longer possible as IE7 now understands the child selector. So, what is the child selector? Well, imagine the following HTML structure:

<div><p><span>Text goes here</span></p></div>

In the above example, the <p> is a child of the <div> and the <span> is a grandchild of the <div>. We can make the text in the <span> red by using the following CSS rule:

div span {color: red;}

This basically means that the contents of the <span> will be red, provided that the <span> is nested within a <div>. That <span> could be a child, grandchild, great-grandchild etc. of the <div>.

Read more   


User reviews

There are no user reviews for this item.

Add new review




Powered by jReviews

Last Updated ( Wednesday, 04 July 2007 )
 
< Prev   Next >