Demo solutions with best practices for some common CSS problems
CSS is getting better, but some common problems are still hard to solve, especially when it comes to layouting. This repo compiles some best practices. The respective stylesheet is included in the HTML files.
- Center blocks: a) horizontal b) vertical: method 1, method 2, method 3
- Adapt block height to its width
- Draw arrow heads on a box
- Any text as list symbol, alternative
- Drop-down menu without JavaScript
- Number hierarchical lists and headlines
- Typographic quotation marks
- Floating issues
- Multi-column layouts a) with fixed outer height: method 1, method 2 b) height determined by content: method 1, method 2, method 3
- Spread elements with equal distance, alternative
- CSS sprites and URIs
- Boxmodel alternatives
- Accessibility skiplinks