Cascading Style Sheets (CSS)

Style hr - horizontal bar

Using the background-image property we can replace the horizontal bar with an image.


The margin-left: auto; and margin-right: auto; are used to center the image on the screen.

hr {
    background-image: url(hr_img.jpg);
    background-repeat: no-repeat;
    height: 32px;
    width: 329px;
    border: none;
    margin-left: auto;
    margin-right: auto;
}

CSS horizontal bar



Important: Microsoft Internet Explorer renders a border around the hr element that can not be removed through CSS properties.

No User Comments.

No User Comments, be the first one to write your comments?

Add your comments

Your Name*:
Your Email:
Site URL:
Site Name:
Comemt Title*:
Your Comment*:
Key Phrase*:
7Bm
Your IP Address: 38.103.63.62
 

ScandicWeb is own by Scandic Systems LTD [UK] Company No. 5984000. All other trademarks and copyrights are the property of their respective holders.