EXPRESSIONENGINE Content from Presentation, Second edition (Briggs et (Web hosting company)
EXPRESSIONENGINE Content from Presentation, Second edition (Briggs et al.; Apress, 2004) to learn more. In this section, the focus is on some of the more flexible and influential styles, plus a few use ful tips and tricks that might make all the difference. Before you begin Let s not beat around the bush. CSS is difficult to master, and some of the concepts can take awhile to sink in. For this reason, the CSS you ll work with is minimal, but feel free to experiment. Just make sure that you keep those template revisions on! In this section, there is quite a lot to cover, including the following: Where is the CSS? Ensuring that CSS affects the templates: If your templates can t see your CSS, they won t be styled. Understanding the layout: a guide to key structural containers and how they fit together to organize your content. Reconfiguring the masthead: how to join the header and main menu. CSS inheritance: how one declaration affects another and when to spot knock-on effects. Understanding the sidebar links: what makes the whole line become a clickable link and how these links can be adjusted. Ticked-off visited links: a guide to creating the versatile and hugely popular ticked- off links, in which a background image is used as a visual indicator of pages already visited. Styling comments: When structuring your blog/more page, you added markup to highlight comments owned by yourself and assigned alternate background colors to the containers. Here you learn more about styling these comments. Optional extras: making use of the hidden strip at the top of every page. Where is the CSS? So, Where s this magical CSS? you wail. Well, the CSS file is located in the weblog tem plates and is called weblog_css. You open and edit it as you would any other template, If you are saving template revisions, they will also apply to weblog_css, so you can always take a few steps back if you screw up. Ensuring that your CSS affects your templates The rules within weblog_css are applied to the templates because a reference link to the file is embedded in every template. The following code snippet shows the entire head sec tion of the index template with the CSS link highlighted:
153