can anyone please turn this into css [...]
<img src="images/line.gif" alt="" width="119" vspace="2" />The only thing that needs to be removed is the vspace attribute, though you can remove the width attribute as well. The former would be replaced by either a margin or padding. Padding would expand the region inside a border (if the element had one). A margin would expand the region outside the border. The CSS specification (http://www.w3.org/TR/REC-CSS2/) contains a helpful diagram (http://www.w3.org/TR/REC-CSS2/box.html#box-dimensions) which illustrates the difference. Padding would be ignored by earlier IE versions, so a margin might be better. A width declaration is included below, which you can either delete or uncomment if you want to use it.
selector {
/* 2 pixel margin above and below the element.
* No margin to the left and right.
*/
margin: 2px 0;
/* width: 119px */
}What you replace selector with will depend on whether this line is used more than once with the same style. If it occurs several times, replace it with a class. For example:
<img class="separator" alt="" src="images/line.gif" />
.separator {
margin: 2px 0;
width: 119px;
}The leading dot is important.
If there is only one such line, use an id instead:
<img id="separator" alt="" src="images/line.gif" />
#separator {
margin: 2px 0;
width: 119px;
}By the way, the slash at the end of the tag should only be included if you're writing XHTML. There is an increase in the use of XHTML-like markup though authors are still writing HTML.
<img scr="images/line.gif" alt="a horizontal line" class="skin">If an image is purely decorative, it should not have substantial alternative text. Consider how a document would be rendered in a text-only user agent, or by an aural browser or screen reader. Is rendering "a horizontal line" actually useful? If not, the value should be empty as the OP originally had it (and as I left it), or perhaps a space if text before and after the image would be concatenated.
A final thought for the OP: rather than an actual image, could you achieve the same thing with a border along the edge of an element, or perhaps a background image repeated horizontally along an element?
Hope that helps,
Mike