How to make horizontal lines with words in the middle using CSS? -


anyone have idea how make horizontal lines words in middle using css?

the design looks below:

---------------- title ------------------ 

if understand question correctly <strike> tag used.

the <strike> tag not supported in html5. html5 use <del> tag instead.

if meant horizontal lines words in middle... try this:

html:

<h2><span>this test</span></h2> <p>this content other</p> 

css:

h2 {    width: 100%;     text-align: center;     border-bottom: 1px solid #000;     line-height: 0.1em;    margin: 10px 0 20px;  }   h2 span {      background:#fff;      padding:0 10px;  } 

jsfiddle:

http://jsfiddle.net/s5y2x/

credits above code: https://stackoverflow.com/a/5214204/3739658

i tested on firefox , chrome


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -