tbrussel Programmer
|
How to place text labels over a div border
Tuesday, August 15 2006 04:13 PM
I am trying to lay text labels over the border of a div so they look nice but using positioning does not work well in all browsers.
Any ideas?
reply
|
AlexT Developer
|
Re:How to place text labels over a div border
Tuesday, August 15 2006 04:15 PM
<fieldset>
<legend>Label Here</legend>
<div class="someclass"><p>E-mail</p>
<input type="text" id="e-mail" />
</div>
</fieldset>
reply
|
Navrang Prayag web designer
|
How to place text labels over a div border
Tuesday, June 02 2015 01:47 AM
You can use the following HTML:
<div>
<h1><span>Div title</span></h1>
</div>
With the following CSS:
div{
border: 1px solid #000;
width: 200px;
height: 200px;
}
div h1{
text-align: center;
margin-top: -10px;
height: 20px;
line-height: 20px;
font-size: 15px;
}
div h1 span{
background-color: white;
}
reply
|