CSS <HR> Properties

2008 Oct 19


The size of a horizontal rule can be set by the stype properties: width and height (corresponding to the size attribute). To set a color it is necessary to use both the color property (used by IE) and the background-color property (used by Firefox and Safari). To use an image instead of a color use the following properties as required:

hr.pix_line {
  background-image: url(line.gif);
  background-repeat: no-repeat;
  background-position: center;
  border: solid;
}