Five things I learnt in Week Six

  1. I’ve finally got the hang of semantic class names/IDs. Don’t use names which describe how an element is presented (.red, #nav-left). Instead use names which give the element meaning (.warning, #sub-nav).
  2. Always write a print style sheet. It shouldn’t take very long, and it adds an extra layer of functionality (and polish) to your website.
  3. Use uneven padding to to centre the separators when styling navigation. I’m not sure why this works, but it does.
  4. Don’t avoid selectors just because older browsers don’t understand them. Using an adjacent sibling selector is the best way to remove the border from the last item in a navigation list. All that will happen in older browsers is that the border won’t be removed and I can live with that.
  5. Always ask ‘What happens if..?’ The best way of making your designs bulletproof.

« »