Is it possible to insert a Horizontal Rule using CSS?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tess1243
    New Member
    • Jun 2010
    • 20

    #1

    Is it possible to insert a Horizontal Rule using CSS?

    Is it possible to insert a Horizontal Rule using CSS?

    Please let me know if my idea of inserting HR using CSS is wrong.

    Thanks.
  • zorgi
    Recognized Expert Contributor
    • Mar 2008
    • 431

    #2
    What do you mean by inserting?

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      strictly speaking: no. a horizontal rule is implemented as HTML element. however, a horizontal bar may just be a border, semantically different but looking alike.

      Comment

      • tess1243
        New Member
        • Jun 2010
        • 20

        #4
        Thanks Dormilich.

        Comment

        • Melvin Aragon
          New Member
          • Sep 2016
          • 1

          #5
          This is an old post but I am posting a response for others who might be looking for an answer to the same question.

          The updated answer is YES!

          header:after {
          content: '';
          display: inline-block;
          width: 100%;
          border: 1px solid red;
          }

          The above will insert a horizontal bar after the header.

          Comment

          Working...