How to adjust the width of a hr tag

后端 未结 7 623
情话喂你
情话喂你 2021-01-19 02:53

I\'ve got a problem with setting the width of


tag.. I mean I want my
tag to be displayed half of the full width like this ima
相关标签:
7条回答
  • 2021-01-19 03:08

    Set the style attributes of the hr element in css

    hr {
        width:50%;
        margin:0 auto;
    }
    
    0 讨论(0)
  • 2021-01-19 03:11
    hr.half-width{
      width:50%;
      margin: 0 auto;
    }
    

    Then add class="half-width" to the hr element.

    0 讨论(0)
  • 2021-01-19 03:11

    You can do like this also

    hr {
        margin: 0rem 10rem 0rem 10rem;
    }
    
    0 讨论(0)
  • 2021-01-19 03:12

    try adjusting font size of your hr tag

    hr{
    font-size: 1.5em;
    }
    
    0 讨论(0)
  • 2021-01-19 03:16

    Fortunately, there is an attribute for this, the only thing you need to do is use the following attribute. In this case, I am going to it a width of 75%. I hope that it'll be helpful to you

    <hr width="75%">
    
    0 讨论(0)
  • 2021-01-19 03:24

    It seems that is not the hr tag. probably it's the border bottom for the span container the text. so the width of the span will define the line width. use padding for the span to adjust the line-width.

    I did a search and it seems this is the theme you are using: https://theme.co/x/

    0 讨论(0)
提交回复
热议问题