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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:07:22+00:00 2026-05-30T15:07:22+00:00

Here is my dev link: http://leongaban.com/dev/just_nav.html I’m having issues with Text alignment and Sprite

  • 0

Here is my dev link:
http://leongaban.com/dev/just_nav.html

I’m having issues with Text alignment and Sprite alignment. This is the css sprite tutorial I am working from.

What I don’t understand is why are the li’s different widths, I looked in Chrome’s inspector and currently the first nav button’s width is 190 and the 2nd is 215.

It seems to be based on the text inside of the li’s. How would I go about correctly creating 4 nav buttons with a size of 196 x 60 with 2 pixels in between the 1st & 2nd and 3rd and 4th?

Any tips welcomed!

Current CSS:

.nav {
width: 790px;
height: 60px;
}

#nav { width: 790px; margin: 0 auto; padding: 0;}

#nav ul {
padding: 0;
margin: 0;
}

#nav li {
width: 196px;
display: inline;
list-style-type: none;
font-family: 'Droid Sans', sans-serif;
font-size: 24px;
color: white;
}

#nav li a {
background-image:url('../img/sprite_nav.png');
background-repeat:no-repeat;
color: white;
text-decoration: none;
text-align: center;
line-height: 30px;
height: 60px;
padding: 0px 2px 32px 100px;
}

#nav li a.item1 {background-position:0px 0px; }
#nav li a:hover.item1 {background-position:0px -60px; }
#nav li a:active.item1 {background-position:0px -120px; }

#nav li a.item2 {background-position:0px 0px; }
#nav li a:hover.item2 {background-position:0px -60px; }
#nav li a:active.item2 {background-position:0px -120px; }

#nav li a.item3 {background-position:0px 0px; }
#nav li a:hover.item3 {background-position:0px -60px; }
#nav li a:active.item3 {background-position:0px -120px; }

#nav li a.item4 {background-position:0px 0px; }
#nav li a:hover.item4 {background-position:0px -60px; }
#nav li a:active.item4 {background-position:0px -120px; }
  • 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-05-30T15:07:23+00:00Added an answer on May 30, 2026 at 3:07 pm
    #nav li a {
    background-image:url('../img/sprite_nav.png');
    background-repeat:no-repeat;
    color: white;
    text-decoration: none;
    line-height: 30px;
    text-align: center;
    height: 45px;
    width: 190px;
    display: block;
    float: left;
    padding: 15px 0px 0px 0px;
    margin-right: 2px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The sidebar navigation here: http://dev.southernlivingplants.com/in_the_garden needs some TLC. There are a couple of issues
[EDIT: Here's a link to a mockup of what I'm trying to create] http://i53.tinypic.com/w9v2np.jpg
I have a test case here: http://www.libsys.und.edu/dev/scroll-test.html It has a DIV containing a very
I am following this tutorial http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-5-magento-models-and-orm-basics . As per this tutorial,when i pass a
Here's a link to my previous question on this same block of code with
Yes we're talking about ASCII codes. My appologies I'm not the Delphi dev here.
I'm the second dev and a recent hire here at a PHP/MySQL shop. I
I am not an expert web-dev so please bear with me here. I would
Here is the issue I am having: I have a large query that needs
Here's a coding problem for those that like this kind of thing. Let's see

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.