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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:59:51+00:00 2026-06-07T01:59:51+00:00

Im trying to vertically align my top menu items in the middle, ive tried

  • 0

Im trying to vertically align my top menu items in the middle, ive tried line-height but because they span 2 lines this will not work. Also when I add a 3rd level to the list the fly out menu is not aligned with the corresponding parent list item. http://jsfiddle.net/pk8Lm/

HTML:

<ul id="nav">
            <li class="rhombusStart">&nbsp;</li>
            <li class="rhombus"><a class="rhlink" href="#"><span>Home</span></a></li>
            <li class="rhombus"><a class="rhlink" href="#"><span>Market <br> Update</span></a></li>
            <li class="rhombus"><a class="rhlink" href="#"><span>Team Membership</span></a></li>
            <li class="rhombus"><a class="rhlink" href="#"><span>FISC Info</span></a>
                <ul>
                    <li><a class="linkchild" href="#">About the FISC</a></li>
                    <li><a class="linkchild" href="#">International</a></li>
                    <li><a class="linkchild" href="#"><img class = "arrow" src="Images/arrow.png" alt="&#9658;">Advantages of listing</a> 
                        <ul>
                            <li><a class="linkchild" href="#">Advantages of Listing</a></li>
                            <li><a class="linkchild" href="#">Products</a></li>
                        </ul>
                    </li>
                    <li><a class="linkchild" href ="#">Links</a></li>
                </ul>
            </li>
            <li class="rhombus"><a class="rhlink" href="#"><span>Contact Us</span></a>
                 <ul>
                    <li><a class="linkchild" href="#">About US</a></li>
                     <li><a class="linkchild" href="#">Details</a></li>
                    <li><a class="linkchild" href="#">Location</a></li>
                  </ul>
            </li>
            <li class="rhombusEnd">&nbsp;</li>
        </ul>

CSS:

/*******************************************
 Menu Styling
*******************************************/
#menu {
    margin: 0 auto;
    padding-left: 2%;
    width: 640px;
    height: 3.5em;
    position: relative;
    top: 0;
    background-color: rgb(255,194,14);
    border: 1px solid rgb(140,51,61);
}
#nav {
     margin:0;
     padding:0;
     list-style-type:none;
     list-style-position:outside;
     position:relative;
     height:3.5em;
     background-color: rgb(255,194,14);
     display: table;
}

#nav ul {
     margin:0;
     padding:0;
     list-style-type:none;
     list-style-position:outside;
     position:relative;
     background-color: rgb(255,194,14);
}

#nav a.linkchild:link,
#nav a.linkchild:active,
#nav a.linkchild:visited {
    display:block;
    padding:0px 5px;
    text-decoration:none;
    background: #b95d73; /* Old browsers */
    background: -moz-linear-gradient(top, #b95d73 0%, #970e2e 0%, #9c1a38 0%, #910022 52%, #b95d73 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b95d73), color-stop(0%,#970e2e), color-stop(0%,#9c1a38), color-stop(52%,#910022), color-stop(100%,#b95d73)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #b95d73 0%,#970e2e 0%,#9c1a38 0%,#910022 52%,#b95d73 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #b95d73 0%,#970e2e 0%,#9c1a38 0%,#910022 52%,#b95d73 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #b95d73 0%,#970e2e 0%,#9c1a38 0%,#910022 52%,#b95d73 100%); /* IE10+ */
    background: linear-gradient(top, #b95d73 0%,#970e2e 0%,#9c1a38 0%,#910022 52%,#b95d73 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b95d73', endColorstr='#b95d73',GradientType=0 ); /* IE6-9 */
    color: white;
}

#nav a.rhlink:link, #nav a.rhlink:active, #nav a.rhlink:visited {
    display: block;
    padding: 0px 5px;
    text-decoration: none;
    color: inherit;
}

#nav li.rhombus:hover {
    background: -webkit-gradient(linear, center top, center bottom, from(#B95D73), color-stop(25%, #9C1A38), color-stop(50%, #970E2E), color-stop(75%, #910022), to(#B95D73)); 
    background: #b95d73; /* Old browsers */
    background: -moz-linear-gradient(top, #b95d73 0%, #9c1a38 25%, #970e2e 50%, #910022 75%, #b95d73 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b95d73), color-stop(25%,#9c1a38), color-stop(50%,#970e2e), color-stop(75%,#910022), color-stop(100%,#b95d73)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #b95d73 0%,#9c1a38 25%,#970e2e 50%,#910022 75%,#b95d73 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #b95d73 0%,#9c1a38 25%,#970e2e 50%,#910022 75%,#b95d73 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #b95d73 0%,#9c1a38 25%,#970e2e 50%,#910022 75%,#b95d73 100%); /* IE10+ */
    background: linear-gradient(top, #b95d73 0%,#9c1a38 25%,#970e2e 50%,#910022 75%,#b95d73 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b95d73', endColorstr='#b95d73',GradientType=0 ); /* IE6-9 */
    color: white;
    text-decoration: none;
}

#nav a.linkchild:hover {
   background: rgb(118,0,18);
   color: white;
}

#nav > li {
    float:left;
    position:relative;
}

#nav > li.rhombus {
    float:left;
    position: relative;
    -webkit-transform-origin:0 0;
    -moz-transform-origin:0 0;
    -ms-transform-origin:0 0;
    -o-transform-origin:0 0;
    transform-origin:0 0;
    -webkit-transform:skew(35deg);
    -moz-transform:skew(35deg);
    -ms-transform:skew(35deg);
    -o-transform:skew(35deg);
    transform:skew(35deg);
    border-right: 1px solid rgb(239,89,24);
    border-left: 1px solid rgb(255,244,80);
    background-color: rgb(255,194,14);
    font-family: Georgia;
    color: rgb(131,0,26);
    width: 8em;
    text-align: center;
    height: 3.5em;
}
#nav > li.rhombusStart {
    float:left;
    position: relative;
    -webkit-transform-origin:0 0;
    -moz-transform-origin:0 0;
    -ms-transform-origin:0 0;
    -o-transform-origin:0 0;
    transform-origin:0 0;
    -webkit-transform:skew(35deg);
    -moz-transform:skew(35deg);
    -ms-transform:skew(35deg);
    -o-transform:skew(35deg);
    transform:skew(35deg);
    border-right: 1px solid rgb(239,89,24);
    background-color: rgb(255,194,14);
    width: 1em;
    height: 3.5em;

}
#nav > li.rhombusEnd {
    float: left;
    position: relative;
    -webkit-transform-origin: 0 0;
    -moz-transform-origin: 0 0;
    -ms-transform-origin: 0 0;
    -o-transform-origin: 0 0;
    transform-origin: 0 0;
    -webkit-transform: skew(35deg);
    -moz-transform: skew(35deg);
    -ms-transform: skew(35deg);
    -o-transform: skew(35deg);
    transform: skew(35deg);
    border-left: 1px solid rgb(255,244,80);
    background-color: rgb(255,194,14);
    width: 1em;
    height: 3.5em;
}   

li.rhombus > a span {
    -webkit-transform:skew(-35deg);
    -moz-transform:skew(-35deg);
    -ms-transform:skew(-35deg);
    -o-transform:skew(-35deg);
    transform:skew(-35deg);
    text-decoration: none;
    vertical-align: middle;
    display: table-cell;     
 }

li.rhombus > ul {
    -webkit-transform-origin:0 0;
    -moz-transform-origin:0 0;
    -ms-transform-origin:0 0;
    -o-transform-origin:0 0;
    transform-origin:0 0;
    -webkit-transform:skew(-35deg);
    -moz-transform:translate(0,1px) skew(-35deg);
    -ms-transform:skew(-35deg);
    -o-transform:skew(-35deg);
    transform:skew(-35deg);
}

#nav ul {
    position:absolute;
    top:3.5em;
    left:0;
    width:15em;
    display:none;
}

#nav li ul a {
    width:15em;
    float:left;
    border-bottom: 1px, solid, rgb(145,0,34);
    border-top: 1px, solid, rgb(178,77,101);
    display: block;
    line-height: 2em;
    text-align: left;
    display: table-cell; 
}

#nav ul ul {
    top:auto;
}

#nav li ul ul {
    left:15em;
    margin:0px 0 0 10px;
}

#nav li:hover ul ul,
#nav li:hover ul ul ul,
#nav li:hover ul ul ul ul {
    display:none;
}

#nav li:hover ul,
#nav li li:hover ul,
#nav li li li:hover ul,
#nav li li li li:hover ul {
    display:block;
}

img.arrow 
{
    float: right;
    vertical-align: middle;
}
  • 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-07T01:59:52+00:00Added an answer on June 7, 2026 at 1:59 am

    Unless you need to support IE6, do:

    • remove display: table from #nav
    • add display: table to the main li elements with links inside them (the ones you want to center).
    • add display: table-cell and vertical-align: middle to the main links inside the li elements.

    And then fiddle around with the looks.

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

Sidebar

Related Questions

I am trying to vertically align a SPAN element in the middle of a
I'm trying to make the menu appear at the middle of 30px line but
im trying to horizontally and vertically align my top anchor tags in my list.
I'm trying to vertically align a h1 element and p in the middle of
I'm trying to use the line-height, vertical-align method to center an image inside a
i am trying to vertically align the table present in the panel but i
I am trying to vertically align a coming soon logo, but not having any
I am trying to vertically align one div to the adjacent div which is
I am trying to align a textblock vertically and horizontally center in a stack
I'm trying to align a text horizontal and vertically. Using de horizontal axis, I

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.