CSS - Border bottom length fixed to 60% -


this question has answer here:

i need on border-bottom length. want set border-bottom length 60%. can using inner div like:

#mydiv {    background: #fed;    _border-bottom: 5px solid red;  }  #mydiv div {    margin: 5px 0px;    width: 60%;    height: 5px;    background-color: red;  }
<div id="mydiv">    div    <div></div>  </div>

but don't want use div, want achieve using border-bottom, search in google , stack no luck.

thanks in advance.

you can use pseudo element this:

#mydiv {    background: #fed;    position: relative;      }  #mydiv::after {    content: "";    width: 60%;    height: 5px;    background: red;    position: absolute;    bottom: -5px;    left: 0;  }
<div id="mydiv">    div  </div>


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo