W3C home > Mailing lists > Public > www-style@w3.org > July 2006

Center text in <div>

From: OOzy Pal <oozypal@gmail.com>
Date: Thu, 13 Jul 2006 22:56:52 +0300
Message-ID: <299ffe0d0607131256k1e574d5dn1e660f57ad5ffc06@mail.gmail.com>
To: www-style@w3.org

Dears

How can I vertically center text in <div> </div>?

I have made this protosite and can't vertically center the menus.

http://codg.bjaili.com/

my css:

html
{
  direction:rtl;

}

#container
{
    width: 780px;
    margin-left: auto;
    margin-right: auto;
}

#uppermenu
{
  width: 780px;
  height:40px;
  border: solid;
  border-width:1px;
}

ul#unav
{
 list-style-type: none;
 width: 100%;
 margin-right: 0;
 padding-right:0;
 float:right;

}

ul#unav li
{
  display: inline;
 }

#logo
{
 width: 780px;
 height: 110px;
 border: solid;
 border-width: 0px 1px 1px 1px;
}

#lowermenu
{
  width: 780px;
  height:30px;
  border: solid;
  border-width: 0px 1px 1px 1px;
}

ul#lnav
{
 padding-right: 0px;
 padding-top: 0px;
 list-style-type: none;
 width: 100%;
 margin-top:auto;
 margin-bottom:auto;

}

ul#lnav li
{
  display: inline;
}

#right-menu
{
 float: right;
 width: 130px;
 height: 300px;
 border: solid;
 border-width: 0px 1px 1px 0px;
}

#content
{
 width: 650px;
 height: 300px;
  border: solid;
  border-width: 0px 1px 1px 1px;
 margin-right: 130px;
}

#footer
{
    width:780px;
      border: solid;
  border-width: 0px 1px 1px 1px;
    clear: both;
}





-- 
OOzy
Kubuntu-Dapper
Received on Thursday, 13 July 2006 19:57:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:46 GMT