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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:22:16+00:00 2026-06-18T16:22:16+00:00

I am trying to vertically align the text inside my nav bar . Ive

  • 0

I am trying to vertically align the text inside my nav bar.

Ive tried using vertical-align. But its not working.

Ive also made sure its got height to actually align inside.

Also, is there a way to fill the nav bar to the end of the page, a parallogram/rectangle. So that there is no white space on right of the links. So it is effectively one long bar, split by parallograms.

http://jsfiddle.net/Z4kUm/

 <ul id="navlist">
                        <li><a><span>Link</span></a></li>
                        <li><a><span>Link</span></a></li>
                        <li><a><span>Link</span></a></li>
                         <li><a><span>Link</span></a></li>
                    </ul>

My css:

ul#navlist {
    padding:10px;
    font: bold 12px Arial, sans-serif;
   display: inline;
}

ul#navlist li {
    float:left;
    margin-right:20px;
    display:inline-block;
    zoom:1;
    position:relative;
    width:125px;
    height: 50px;
    list-style: none;
    color:#757575;
}

ul#navlist li a {
    display: inline-block;
    vertical-align: middle;
    text-decoration:none;
    padding:5px 10px;
    transform: skewX(-20deg);
    -o-transform: skewX(-20deg);
    -moz-transform: skewX(-20deg);
    -webkit-transform: skewX(-20deg);
     width:115px;
     height: 40px;

}

ul#navlist li a span 
{
    width: 100%;
    height: 40px; 
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    transform: skewX(20deg);
    -o-transform: skewX(20deg);
    -moz-transform: skewX(20deg);
    -webkit-transform: skewX(20deg);
}

ul#navlist li a {
    background:#AAA;
}
  • 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-18T16:22:17+00:00Added an answer on June 18, 2026 at 4:22 pm

    Set the line-height property on the spans to match their height.

    jsFiddle example

    ul#navlist li a span 
    {
        width: 100%;
        height: 40px; 
        line-height:40px;
        display: inline-block;
        text-align: center;
        vertical-align: middle;
        transform: skewX(20deg);
        -o-transform: skewX(20deg);
        -moz-transform: skewX(20deg);
        -webkit-transform: skewX(20deg);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to vertically align some text inside a div using a CSS
I'm trying to align a text horizontal and vertically. Using de horizontal axis, I
I'm trying to vertically align text in a couple of containers using line-height ,
I am trying to align <a> tags inside <li> but i can do it
I am trying to align label text vertically aligned for my iPhone application Timer.
I'm trying to use the line-height, vertical-align method to center an image inside a
http://cssdesk.com/sv2Wq I'm trying to vertically align the text in respective <li> . The way
I'm trying to vertically center text in a div using the method outlined in
Im trying to center vertically text and icon, but I have problem and can't
I am trying to vertically align text in IE7 is proving to be a

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.