html - CSS, create a line next to text -


this question has answer here:

i've read multiple threads without success.

i'm looking creating line next text in css. i'm not allowed change html code adding span element html code not solution me.

this looks like.

<legend>text</legend> 

and want create line http://imgur.com/bvq2txt

any solution without changing html-code?

you can this:

legend { height: 18px; position: relative; background: #fff; display: inline-bock; margin-left: 5px; }  legend:before { content: ""; display: block; font-size: 0; line-height: 0; text-indent: -4000px; position: absolute; top: 8px; left: -5px; right: -100px; height: 1px; border-top: 1px solid red; z-index: -1; } 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -