Quick Nav:  Online Store   |   Login | Register

Vertical text align

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
skiMaster
<20 Posts
Posts:1


03/31/2008 11:26 AM  

Hello,

Firstly it is a great menu, we have used it on  many sites and it works perfect - thanks.

 

Now the problem:

I am trying to vertically  align (equivelent valign=middle) the navigation text in the vertical menu.

Wondered if you have any ideas as how to do it. I can do it in Firefox via display:table; display:table-cell; vertical-align:middle; but no luck with IE.

Thanks for your time.

Matt

#nav ul {
    list-style:none;
    float:left;
    width:250px;
 margin:0px;
 padding:0px;
}
#nav li {
  float:left;
  width:125px;
  height:111px;
  list-style: none;
  text-align:left;
  background-image:url(image1.jpg);
  background-repeat:no-repeat;
}
#nav a {
 display:block;
 width: 60px;
 height:111px;
 w\idth :60px;
 margin:0px;
 padding-left:32px;
 text-align:center;
}

 






John Mitchell
Posts:3352


03/31/2008 11:39 AM  

Hi Matt,
Thanks for the positive feedback.

You can try vertical-align:middle on your #nav a selector.  It should do something since it is display:block making it a block level element instead of inline.

That may not work as desired across browsers though.

Here are some other ideas:

http://phrogz.net/CSS/vertical-align/index.html

 

The fixed line-height looks like it may work in your case.

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.



ActiveForums 3.7
Powered by: Snapsis Software