Five things I learnt in Week Six
- 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).
- 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.
- Use uneven padding to to centre the separators when styling navigation. I’m not sure why this works, but it does.
- 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.
- Always ask ‘What happens if..?’ The best way of making your designs bulletproof.