CSS: Basics plus - build on your Cascading Style Sheet language knowledge
Expand your knowledge of the art of combining XHTML with CSS.
XHTML CSS code snippets listed by subject and organised in a tutorial style each building on the previous example. New topics are introduced when required.
Methods for fine-tuning individual styles. |
|
1. |
Mutiple and descendant selectors. Use of multiple and descendant selectors to define specific styles. Notation format: correct use of comma or whitespace separators for each case. |
2. |
Combining element and class, combining multiple class names. Combining element and class selectors. Notation when combining multiple class names. |
3. |
Inline styles. Take cascading precedence over external style sheets with inline styles. By using the 'style' attribute. By using the <span> element.
|
Placing images and text in a web page. |
|
4. |
Images. Define the size of the image with a placeholder. Float an image within text. Using the 'alt' and 'title' attributes. Example uses 'Lorem ipsum' text for demonstration purposes. |
5. |
More images and text. Float an image within text using 'clear' to clear the paragraph text from the floated image.
|
Experimenting with page backgrounds. |
|
6. |
Page backgrounds. Setting background colour (color) and background image. Page will then degrade gracefully to show background colour if background image is not available. |
7. |
More backgrounds. Repeating the background image along the x or y axis for effect. From a set starting position on the page.
|
Build on the above with CSS Positioning. View positioning examples on XHTML: CSS Layout page.
|
|
| Suggest a code snippet to add to this category. | |
Back to top.
Copyright © 2006-2010 justfigures.co.uk

