The Open Source Swiss Army Knife

/web_design/sample_sheets/
/web_design/sample_sheets/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /web_design   /sample_sheets 
Permalink: hr2.htm
Title: add
article options : please login   |  print view

The 'margin' property puts half an em of space above and below the rule and makes the right margin 60% (of the parent's width). The line is therefore 40% of the parent's width long.

Here is another solution, that creates a black rectangle by using the 'background' and 'height' properties.

HR {margin: 0.5em 60% 0.5em 0;
    height: 0.04em;
    background: black}

The black rectangle is 0.04em high and has a width of 40% of the parent's width.



Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top