Draw a line to the right of the text (HTML/CSS) (Compatible IE6) -
how can draw line right of text, exemple : "title _______" line must complete div. without image , ie6 compatible.
i :
<div id="mydiv"> <h1 class="title">my title</h1> </div> .title { margin-top: 15px; margin-bottom: 10px; color: rgb(102,102,204); font-size: 18px; font-weight: bold; border-bottom:2px solid #000; border-color: rgb(102,102,204); }
but line in bad position.
thanks
you can use pseudo element here , given border .title:after()
.title { margin-top: 15px; margin-bottom: 10px; color: rgb(102,102,204); font-size: 18px; font-weight: bold; line-height: 14px; } .title::after { border-bottom:1px solid #000; border-color: rgb(102,102,204); content: ""; display: block; height: 0; margin-left: 75px; }
<div id="mydiv"> <h1 class="title">my title</h1> </div>
Comments
Post a Comment