dcsimg

Using the CSS "any" Selector, Developers Go Simple

By HTMLGoodies Staff

While the new tags introduced by HTML5 are very useful for enabling the use of new features, including tags for sections, articles, asides, headers and footers, they can also make a developer's work more difficult to style using CSS. By using the CSS "any" selector, a developer's life can once again be easier. 

The -any() pseudo selector, which was proposed by Mozilla, makes life easier and makes CSS code much easier to read. It groups all of your top level tags together, and moves on to do the same with the next level of tags, and then moves on to H1 tags. 

The only limitation to using the any selector is that currently it is only supported by Firefox 4 and WebKit-based browsers. Hopefully it's only a temporary limitation, as it was only introduced a year ago, and three browsers already support it. 

View Full Article



Make a Comment

Loading Comments...

  • Web Development Newsletter Signup

    Invalid email
    You have successfuly registered to our newsletter.

    By submitting your information, you agree that htmlgoodies.com may send you HTMLGOODIES offers via email, phone and text message, as well as email offers about other products and services that HTMLGOODIES believes may be of interest to you. HTMLGOODIES will process your information in accordance with the Quinstreet Privacy Policy.

  •  
  •  
  •  
Thanks for your registration, follow us on our social networks to keep up-to-date