Tip 10Styling Tables with Pseudoclasses

A pseudoclass in CSS is a way to select elements based on information that lies outside the document or information that can’t be expressed using normal selectors. You’ve probably used pseudoclasses like :hover before to change the color of a link when the user hovers over it with the mouse pointer. CSS3 has several new pseudoclasses that make locating elements much easier.

AwesomeCo uses a third-party billing and invoicing system for products it ships. You see, one of AwesomeCo’s biggest markets is conference swag, such as pens, cups, shirts, and anything else you can slap your logo on. You’ve been asked to make the invoice more readable. Right now, the developers are producing a standard HTML table that ...

Get HTML5 and CSS3, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.