What I’ve Learned So Far
With Apress’s Pro CSS and HTML Design Patterns:
- A design pattern consists of four elements: pattern name, problem, solution, and tradeoffs.
- Cascade order is determined by selector priority, then number of selectors ordered by priority, then location groups, then location level, and finally listing order.
- To simplify the cascade, minimise the number of stylesheets linked or imported, and sort the selectors by importance.
- Use baseline stylesheets to reset styles created by the browser.
- A good HTML structure is important as it provides the basis for the CSS selectors. HTML or XHTML can be validated to ensure that the document is valid.
- The safest MIME type to use for XHTML is
text/html. <!DOCTYPE>must be the first element in a document; otherwise Internet Explorer 6 will render in Quirks mode, which does not follow CSS standards.- Use conditional stylesheets instead of hacks to target Internet Explorer 6/7.
- Block elements should not be siblings with inline elements. Do not put content in between blocks; rather, content must be inside a terminal block at all times.
Decided to forgo CSS: The Definitive Guide as I found it to be a beginner’s book. The other book I’m reading in conjunction with Design Patterns is CSS Mastery: Advanced Web Standards Solutions.
I will be writing my notes in this blog so that I can keep track whether I’m learning anything!!
Leave a Comment
Be the first to comment!