tailieunhanh - The CSS Anthology: 101 Essential Tips, Tricks & Hacks- P9

The CSS Anthology: 101 Essential Tips, Tricks & Hacks- P9:Apart from writing books like this one, I write code. I make my living by building web sites and applications as, I’m sure, many readers of this book do. I use CSS to complete jobs every day, and I know what it’s like to struggle to make CSS work when the project needs to be finished the next morning. | Navigation 137 chapter04 excerpt ul nav a hover background-position 0 -42px ul nav a hover background-position -75px -42px ul nav a hover background-position -180px -42px ul nav a hover background-position -265px -42px Summary This chapter has discussed a range of different ways in which we can create navigation using structurally sound markup as well as provided examples that can be used as starting points for your own experiments. On existing sites where a full redesign is unfeasible introducing a CSS-based navigation system can be a good way to improve the site s accessibility and performance without affecting its look and feel in a big way. Download at Download at Chapter Tabular Data You ve probably heard the mantra tables are for tabula data not layout. Originally designed to display tabular data correctly in HTML documents they were soon misappropriated as a way to lay out web pages. Back then understanding how to create complex layouts using nested tables was a part of the standard skill set of every web designer. However using tables in this way requires large amounts of markup and can cause real problems for users who are trying to access content using screen readers or other text-only devices. Since then the Web Standards movement has pushed for the replacement of tabular layouts with CSS which is designed for the job and is ultimately far more flexible as we ll discover in Chapter 9. But far from being evil tables can and should still be used for their true purpose that of displaying tabular data. This chapter will illustrate some common correct uses of tables incorporating elements and attributes that though used infrequently help to make your tables accessible. We ll also look at how CSS can make these tables more attractive and usable for those viewing them in a web browser. Download at .