Can I do such a thing with CSS?
I had an Idea with text-decoration , but it is always problem with text lenght. Can i do something like that with only one html element?
Can I do such a thing with CSS?
I had an Idea with text-decoration , but it is always problem with text lenght. Can i do something like that with only one html element?
This answer applied to your question:
#line{
border-bottom: 1px black dotted;
overflow:visible;
height:9px;
margin: 5px 0 10px 0;
}
#line span{
background-color: white;
padding: 0 5px;
}
<div id="line"><span>TEXT</span></div>
It ain't too pretty but http://jsfiddle.net/csswizardry/34bBd/
Uses one element, doesn't rely on hard-coded numbers, perfectly reusable.
I think you should use fieldset with legend tag. and remove those lines you might not need. like left right and button. (or make the color white or transparent)