CSS needs to be with style tags OR in an external stylesheet file (more on that later).
Style tags should be in the head of the document
Code:
<head>
... other head tags ...
<style type="text/css">
#sign {
border:1px solid red;
}
</style>
</head>
The #sign is refering to a
single element that has the id "sign". This can be anything in your document but only 1 thing.
ids must be unique
In our case whatver is marked up as "sign" will have a 1 pixel red border around it.
For example:
Code:
<img id="sign" src="path/to/my/image.jpg" alt="alternative text is important">
or we could put it around a paragraph of text
Code:
<p id="sign">Here's some text with a red border</p>
Now, remember I mentioned external stylesheet files?
Well, it's often desirable to use one, but if you do then you don't put the <style> tags in the CSS file.
You could link to the file like so:
Code:
<link rel="stylesheet" type="text/css" href="mystyles.css" media="all">
That will load the stylesheet file which would contain the rules that were between your <style> tags.
There is a "proper" CSS way to import the stylesheet file, but we won't go there right now as there are a few reasons that can make it undesirable.
In short, you apply ids by
adding the id attribute to an element
as well as the "normal" attributes for that element.
Does that clear things up a bit?
<honk>*:
O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2