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

  • SEARCH
  • Home
  • 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 8030265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:42:45+00:00 2026-06-05T00:42:45+00:00

Hello I can’t get an anchor tag vertically centered within unordered list. My CSS

  • 0

Hello I can’t get an anchor tag vertically centered within unordered list. My CSS is:

*{ margin: 0; padding: 0;}

html {
    height: 100%;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 62.5%;
    background-color:rgba(0,0,0, 0.7);
    height: 100%;
}

.container {
    margin-left: 9.814814814814815%; /* 106 / 1080 */
    margin-right: 10.092592592592593%; /* 109 / 1080 */
    width: 80%; /* 864 / 1080 */
    height: 100%;
}

nav ul{
    list-style-type: none;
}

nav ul li {
    display: inline-block;
}

nav ul li a {
    color: white;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 2em;
}

nav {
    background-color: black;
    margin-top: 5.0595238095238096%; /* 85 / 1680 */
    height:  5.476190476190476%; /* 92 / 1680 */
}

Then here’s my html:

<div class="container">
    <nav>
        <ul>
            <li><a href="/">home</a></li>
            <li><a href="/get_involved">get involved</a></li>
        </ul>
    </nav>
</div>
  • 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-05T00:42:47+00:00Added an answer on June 5, 2026 at 12:42 am

    To achieve “vertical centering”, add either line-height or padding to your <a> elements:

    nav ul li a {
        color: white;
        text-transform: uppercase;
        text-decoration: none;
        font-size: 2em;
        padding: 10px 0;
    }
    

    You can also adjust the height of the parent <li> element to fine-tune the “centering”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

HEllo , i can not find any way to get horizontal or/and vertical resolution
I can not get environment at custom target shell. CMakeList.txt set( ENV{TEST_VAR} Hello )
Why the #hello can fade out but not show anymore?? thanks! <!DOCTYPE html> <html>
i want to call an exe file(abc.exe) from another application(hello) how can i get
In python I can write Hello * 5 and get HelloHelloHelloHelloHello Is there a
Using a default index, one can do nodeIndex.get(message, Hello) for exact matches, or nodeIndex.query(message,
Hello I can't get my script fully operational. I have it calculating properly but
Hello how can i link to a SonataUserAdmin Controller Page ie. list in a
Hello how can i remove item from generic list here is my code im
hello how can i call in the current view, a method implemented in the

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.