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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:26:44+00:00 2026-05-19T17:26:44+00:00

I need to make a css navigation according to the following style: DESIRED LOOK

  • 0

I need to make a css navigation according to the following style:

DESIRED LOOK

enter image description here

Below are the designs that I have done:-

1)Exhibit A – made using sprites

enter image description here

Note: Ignore the arrangement of the menu items

Pros: works well and has the desired look

Cons: if there is a need to add another menu item, another image must be manually made for that particular menu item. ie. not extensible

2)Exhibit B

enter image description here

Pros: very extensible. If another menu item must be added, new extra images need not be made. Only the menu name need to be typed in the html code.

Cons: the hover effect is not the same as the desired look.

My Requirement

Is to use Exhibit B, along with the hover effect from Exhibit A, but without having to add extra images when a menu item is created(this is what happens in Exhibit A, although it has the desired hover effect).

My approach:

  1. Start working with Exhibit B
  2. For the hover effect in the case of a single menu item use 3 images

a)left most edge left most edge

b)repeating slice of the middle area repeating slice of the middle area

c)right most edge right most edge

Is this correct ?

Is this possible ?

Is there a better way? A link to a tute would be fine.

Thanks


1] css code for Exhibit A

@charset "UTF-8";
* {
margin:0;
padding:0;
list-style: none;
}

ul {
list-style: none;
margin: 0;
padding: 0;
}

img {
    border: none;
}

.clear {
clear:both;
}

.nav-container {
width: 960px;
}
#navMenu{
display: inline;
margin: 0;
padding: 0px;
position: relative;
z-index: 5;
}
#navMenu li{
float: left;
display: inline;
}

#navMenu li.navRepeat{
float: left;
display: inline;
background-image:url("../images/navigation_repeat.gif");
width:425px;
height:40px;
}

#navMenu li.navRepeatEnd{
float: right;
display: inline;
background-image:url("../images/navigation_repeat_end.gif");
width:1px;
height:40px;
}

a.navReservations{
display:block;
float:left;
width:89px;
height:40px;
background-repeat:no-repeat;
background: url("../images/reservations.gif")
}

a.navReservations:hover{
background: url("../images/reservations.gif") 0 40px;
}

a.navRentals{
display:block;
float:left;
width:62px;
height:40px;
background-repeat:no-repeat;
background: url("../images/rentals.gif")
}

a .navReservations {
float: left;
display: inline;
height: 100px;
width: 400px;
}

a.navRentals:hover{
background: url("../images/rentals.gif") 0 40px;
}

a.navTariffs{
display:block;
float:left;
width:59px;
height:40px;
background-repeat:no-repeat;
background: url("../images/tariffs.gif")
}

a.navTariffs:hover{
background: url("../images/tariffs.gif") 0 40px;
}

a.navFleet{
display:block;
float:left;
width:64px;
height:40px;
background-repeat:no-repeat;
background: url("../images/fleet.gif")
}

a.navFleet:hover{
background: url("../images/fleet.gif") 0 40px;
}

a.navTools{
display:block;
float:left;
width:56px;
height:40px;
background-repeat:no-repeat;
background: url("../images/tools.gif")
}

a.navTools:hover{
background: url("../images/tools.gif") 0 40px;
}

a.navReports{
display:block;
float:left;
width:71px;
height:40px;
background-repeat:no-repeat;
background: url("../images/reports.gif")
}

a.navReports:hover{
background: url("../images/reports.gif") 0 40px;
}

a.navSystem-Management{
display:block;
float:left;
width:133px;
height:40px;
background-repeat:no-repeat;
background: url("../images/system_management.gif")
}

a.navSystem-Management:hover{
    background: url("../images/system_management.gif") 0 40px;
}

2] css code for Exhibit B

#navigation {
width: 959px;
height: 36px;
margin: 0;
padding: 0;
background-image: url(images/navigation-bg.gif);
background-repeat: no-repeat;
background-position: left top;
border: 1px solid #CCC;
} 
#navigation ul {
list-style: none;
margin: 0;
padding: 0;
} 
#navigation ul li {
display: inline;
margin: 0px;
} 
#navigation ul li a {
height:27px;
display: block;
float: left;
color: #000;
text-decoration: none;
font-family: Arial;
font-size: 12px;
font-weight: bold;
background-image: url(images/navigation-separator.gif);
background-repeat: no-repeat;
background-position: right center;
padding-top: 6px;
padding-right: 15px;
padding-left: 15px;
vertical-align: 10%;
padding-bottom: 4px;
} 

#navigation ul li a:hover {
color:#FFF;
background-image: url(images/navigation-hover.gif);
background-repeat: repeat-x;
background-position: left top;
}

#navigation ul li#active a {
color:#363636;
background: url(images/navigation-hover.png) repeat-x left top;
}
  • 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-19T17:26:44+00:00Added an answer on May 19, 2026 at 5:26 pm

    Well you technically only need two sprites, a wide left + body of the tab and a right side. By wide, I mean, 400px or some arbitrarily wide size that you don’t anticipate hitting. You’re trading a kb for easy of use. You can accomplish this by having markup like:

    <ul class="list">
        <li><a href="#">Text</a></li>
    </ul>
    

    with css like:

    ul.list
    {
        list-style-type: none;
        margin: 0;
    }
    ul.list li 
    {
        float: left;
        background: url(leftpluswide.png) top left no-repeat;
    }
    ul.list li a
    {
        background: url(right.png) top right no-repeat;
    }
    

    The only caveat is that since the right.png will be overlapping the background on the li, you’ll need to make sure that it doesn’t have any transparency.

    Also for completeness sake, you might need to apply a height to the li and the a (which will potentially require a display:inline-block or a line-height to take it) to make everything line up well.

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

Sidebar

Related Questions

I have a Perl module CSS::Minifier that I need to make executable (command line
I need to style this navigation bar with css. It's unordered list. What I
I need to make a few tweaks to only the following elements from jquery.ui.autocomplete.css
I am working on my website and I need to make some css that
I have an old layout that uses tables and I need to make a
I need to make a series (1-20) ajax calls and I need to have
I need to make the top header of a report disappear. The part that
I need to make a css background image fade slideshow. For several reasons, i
I am trying to make CSS drop down menu (no javascript involved). According to
I need to make a slider. I have content (which should shift horizontally) and

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.