HTML and CSS Techniques and Tools
HTML and CSS Techniques and Tools
Last modified: July 26, 2009 - 11:45 For all the effort you put into building your site the most important thing to your users is how your site looks. Managing the inconsistencies in your theme for each browser, for each module, and for user selectable themes can be very challenging. First you should familiarize yourself with basic Cascading Style Sheets (CSS) concepts. Review CSS Discuss or HTML dog for CSS resources. A good overview of the power of CSS can be seen at the CSS Zen Garden.
how CSS classes for your theme are applied to the underlying xHTML is the key to understanding your theme. 2. Use standard CSS naming conventions. We recommend adopting these naming conventions for your CSS classes. 3. Select a valid DOCTYPE type for your theme and include a DocType Declaration(DTD). 4. To help in analyzing your HTML and CSS we recommend you install the Firebug plugin for Firefox. It is an invaluable tool that allows you to look at your css and html and change it in real time to evaluate the effects of your changes. Another very useful Firefox plugin is the Web Developer toolbar. This has tons of handy utilities. 5. Before you start modifying your CSS to fix your bugs it is important to ensure you are styling valid HTML or xHTML. There is a web validator built into the Firefox Web Developer toolbar. Opera has built in validation, just press Ctrl+Alt+V. 6. A more advanced tool for analyzing and detecting errors in HTML pages is the Watchfire WebXACT tool. 7. If you find a problem with invalid xHTML in a module, file an issue and include screenshots showing how this causes problems in the theme. 8. To see how your site will look to search engines you can use Lynx viewer. 9. The Firefox Total Validator add-on provides validation and screen shots showing how your page looks in various browsers (including Lynx). Total Validator validates your HTML against the schema for HTML and highlights some errors the other validators miss. 10. Positioning problems in your site with Internet Explorer can be resolved using these references: Position Everything Internet Explorer Primer 11. A library of examples of xHTML and CSS problems can be found at Quirks mode.
If you are looking for a theme to start with Zen or Foundation are good base themes for CSSbased theming. There is also BlueMarine, which uses tables for layout (not a W3C recommendation).