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 7783619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:53:33+00:00 2026-06-01T19:53:33+00:00

Please help, i want to align the header menu/nav links to vertically align. See:

  • 0

Please help,

i want to align the header menu/nav links to vertically align. See:

http://hyindia.com/demo/myoffshore/index.html

See the CODE here:

nav ul { list-style-type:none; padding:0px; margin:0px; float:left; width:100%;}
nav ul li { float:left; width:119px; height:66px;}
nav ul li a { 
 float:left;
 width:119px;
 height:66px;
 font:bold 15px 'Myriad Pro';
 color:#fff;
 text-shadow:1px 1px #1f1f1f;
 text-align:center;
}

<nav>
<ul>
    <li><a href="#" class="nav1">HOME</a></li>
    <li><a href="#" class="nav2">HEALTH INSURANCE</a></li>
    <li><a href="#" class="nav3">LIFE INSURANCE</a></li>
    <li><a href="#" class="nav4">OVERSEAS MORTGAGES</a></li>
    <li><a href="#" class="nav5">ESTATE PLANNING</a></li>
    <li><a href="#" class="nav6">BANKING</a></li>
    <li><a href="#" class="nav7">WEALTH MANAGEMENT</a></li>
    <li><a href="#" class="nav8">QROPS</a></li>
</ul>

  • 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-01T19:53:34+00:00Added an answer on June 1, 2026 at 7:53 pm

    Since some of your nav items have text spanning several rows you won’t be able to use the classic line-height-trick (which would be to set the line-height equal to the height).

    Instead I’d suggest changing your menu styling to use display: table/table-row/table-cell since tables are excellent at vertically aligning things in the middle.

    What you need to do is to change your entire nav styling to this:

    nav {
        display: table;
        width: 100%;
    }
    
        nav ul {
            display: table-row;
            list-style: none;
            padding: 0;
            margin: 0;
        }
    
            nav ul li {
                display: table-cell;
                vertical-align: middle;
            }
    
                nav ul li a {
                    display: block;
                    padding: 5px 10px;
                }
    

    Remove all the floats and widths + heights (using padding on the a instead) etc (what I have above is all you should have).

    You’ll also need to move the actual background styling from the as to the lis since the as won’t be equal in height any more (but the lis will).

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

Sidebar

Related Questions

Can somebody please help me, I want to put the OK symbol throw HTML
Could someone please help me in here, I'm just a beginner who want to
Hi i want to upload mulitiple file using rails 3 and paperclip please help
I want to add background image to uinavigationcontroller. Please help me.
Desperate, please help. Will work for food :) I want to be able to
This is my 3rd SO question. Please help again... I want to put up
I cannot find where the sqlcmd is? i just want the prompt. please help!
I want to Integrate Weather radar on my MapView.Please anyone help on doing this
Can anyone help me out please? I'm confused. I want to set up my
Please help to the newbie in WPF! I need to build a TreeView with

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.