NM Web Tutorials
XHTML
Display Picture Make Text Link Make Image Link Basic Text Attributes Make a List Easy Back Button HEX ColoursCSS
Font/Colour Attributes Roll Over-text Roll Over-image Borders Float Margins Padding BackgroundsOther Useful Tips
Add to Search Engine TermsIn order for your CSS to work, you have to tell your XHTML document where it is, to do this you need to copy this code:
<link href="my_file.css" rel="stylesheet" type="text/css" media="screen" />
into the <head> of your document. I usually put it right underneath the <title>. If your not sure where I’m talking about, this should make it a little easier for you:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Text, Hover states, and Backgrounds</title>
<link href="my_file.css" rel="stylesheet" type="text/css" media="screen" />
</head>
You can have this put into all of your pages, that way your CSS will be applied to every one of those pages. Which is good, because you never know when you’ll need to change the all your backgrounds and all of your text, you don’t have to change every single page.
Example of how you structure a portion of CSS code
selector {
property: value;
}
Selector: Thing that you want to change
Property: attribute
Value: variation
You can also have it structured so everything is on the same line like this:
selector {property: value;}
But once you start adding multiply properties, it might be easier for you to understand the way the first example is set up.
This section of code is called a Style Rule (the middle line in the first example is called declaration). This will all make more sense once I show you some more examples.
Home | Manipulate Text | Getting Started | Css Intro