css position:absolute problem -



css position:absolute problem -

i have css problem. here need.

no matter how many words title have(example: title what's new today?, hello world)

it have background line pass through whole div, , word's background white. (the word should text-align:center; , it's background looks broken line)

here code:

<style> .ocell { width:960px; height:42px; text-align:center; padding: 20px 0 20px 0; } .wd { margin: 0 auto; background-col: white; margin-left: -10px; padding: 5px; } .line { position: absolute; border-bottom: solid 1px #999; margin-top:-18px; width: 960px; } </style> <div class="ocell"> <div class="wd">title</div> <div class="line"></div> </div>

also in http://jsfiddle.net/zapla/ may can utilize background-image instead of line. thanks.

this can achieved using div border-bottom line, , positioning element text on line. fiddle here.

css

Comments

Popular posts from this blog

c# - Move local mssql database to webhosted MYSQL -

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -