Horizontal Rule Section

Horizontal Rule Markup Code

Horizonal rule (<hr>) elements separate each section of the static navigation.

This is the markup for the horizontal rule elements:

  1. /* Horizonal Rule markup code */
  2.  
  3.   <hr>
  4.  
  5. /* end Horizonal Rule markup code */

top

Horizontal Rule C.S.S. Code

The hr element is defined as so:

#nav hr
margin: 1.5em 0em; - shorthand for the margin property:
  • margin-top and margin-bottom: 1.5em; - sets the top and bottom margins
  • margin-left and margin-right: 0em; - sets the left and right margins

This is the presentation code used to style the horizontal rules.

  1. /* Horizontal Rule presentation code */
  2.  
  3. #nav hr {
  4.   margin: 1.5em 0em; }
  5.  
  6. /* end Horizontal Rule presentation code */

top