Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8088171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:00:35+00:00 2026-06-05T19:00:35+00:00

I have an unordered list… <ul class=hide> <li class=home> <div class=link> <a href=/>Home</a> </div>

  • 0

I have an unordered list…

<ul class="hide">
  <li class="home">
    <div class="link">
      <a href="/">Home</a>
    </div>
  </li>
  <li class="about">
    <div class="link">
      <a href="/about">About Our Community</a>
    </div>
  </li>
  <li class="contact">
    <div class="link">
      <a href="/contact">Contact Us</a>
    </div>
  </li>
</ul>

My CSS looks like this….

#sitenav ul li .link a {
  color: #555;
  text-decoration: none;
  float: left;
  padding-right: 3px;
  margin-top: auto;
  margin-bottom: auto;
}

But the margins do not center the link vertically

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:00:38+00:00Added an answer on June 5, 2026 at 7:00 pm

    This solution could work for you: http://jsfiddle.net/WLQAS/8/

    margin-top: auto; and margin-bottom: auto; don’t work to align vertically the objects.

    Updated CSS

    li {
      color: #555;
      text-decoration: none;
      float: left;
      padding-right: 3px;    
    }
    
    .link {
        vertical-align: middle;
        display: table-cell;
        height: 50px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have an unordered list, e.g. <ul> <li><a href=index.html>Home</a></li> <li><a href=index.html>About</a></li> <li><a href=index.html>Service</a></li>
I have a unordered list: <ul id=sortable> <li id=1 class=ui-state-default>First <a href='#' title='delete' class=itemDelete>x</a></li>
I have an unordered list as follows: <ul id=menu> <li><a href=#>Event Overview</a> <ul class=sub-menu>
I have an unordered list like this: <div class=blueBoxMid> <ul> <li>First item <em>This is
I have an unordered list of links. <ul> <li><a href=#>Link is really really really
So I have an unordered list like so: <nav id=breadcrumbs> <a href=# id=home></a> <ul
I have an unordered list inside a div with a background image for each
I have an unordered list. <ul> <li class=foo>Baz</li> <li>Select Me!</li> <li>Select Me!</li> <li>Select Me!</li>
I have an unordered list with list items. I have a class called 'active',
I have an unordered list such as: <ul id=cities> <li><a href=/london/>London<a></li> <li><a href=/new-york/>New York<a></li>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.