Horizontal rule/line beneath each

heading in CSS

后端 未结 6 773
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 09:01

I am trying to place a 100% horizontal line (rule) automatically beneath every instance of an

 

header tag using CSS.

Example

6条回答
  •  無奈伤痛
    2021-02-05 09:39

    If you are feeling something is going wrong, you can use zoom: 1;. See this fiddle

    (I have removed span but you can set class to your h1 tag.)

    CSS

    h1 {
        font-family: Calibri, "Helvetica", san-serif;
        line-height: 1.5em;
        color: black;
        font-size: 20px;
        border-bottom: 2px solid red;
        zoom: 1;
    }
    

    HTML...

    Introduction

提交回复
热议问题