Click to See Complete Forum and Search --> : verticle alignment of txt


lohumihem
12-01-2006, 05:38 AM
hi guys ! i need to align txt vertically in div can u help me out plzzzz...
chk the code
<div class="menu">
<div class="menuleft"></div>

<div class="rightmenudiv"></div>
<div style="width:600px" class="menuheading">

Home| About Us | Resources | Articles | Services | FAQs | Contact Us</div>
</div>



and css is ...


.menu{
width:778px;
height:36px;
background-image:url(images/studentlaons_08.gif);
background-repeat:repeat-x;
}

.rightmenudiv
{
width:29px;
background-image:url(images/studentlaons_10.gif);
background-repeat:no-repeat;
background-position: top right;
float:right;
height:36px;
}


.menuleft
{
background-image:url(images/studentlaons_07.gif);
background-repeat:no-repeat;
background-position: top left;
height:36px;
float:left;
width:37px;
}
.menuheading
{
color:#333333;
vertical-align:middle;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
text-decoration: none;
letter-spacing: 1px;
text-align: center;
height:15px;

/*position:absolute;
top:40px;*/
}

KDLA
12-01-2006, 07:15 AM
Since you're using small text strings, the asiest way it to use line-height:36px. This will position your text in the middle of the 36px.

reference: http://www.w3.org/TR/REC-CSS2/visudet.html#line-height
KDLA

lohumihem
12-01-2006, 10:06 PM
thanx a lot dear it is working now.. thnax again!!! :)