Friday, December 26, 2008

StyleSheet for Floating Div Tag in HTML

Here is the StyleSheet for displaying a floating DIV tag in HTML. This is often required to display status, Tooltips etc.

DIV.floatingDiv
{
border-right: #0067a2 3px solid;
padding-right: 3px;
border-top: #0067a2 3px solid;
padding-left: 3px;
z-index: 1;
left: 18%;
float: none;
visibility: visible;
padding-bottom: 3px;
margin: 2px;
border-left: #0067a2 3px solid;
padding-top: 3px;
border-bottom: #0067a2 3px solid;
position: absolute;
top: 27%;
background-color: #6095b3;
width: 600px;
height: 220px;
}

Include the above class in your stylesheet and use ash shown below:

<div class="floatingDiv" id="Test_1"> </div>

Hope this helps you!

0 comments:

Post a Comment