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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:31:45+00:00 2026-05-25T09:31:45+00:00

im trying to build a horizontal menu with images sprites and text Here is

  • 0

im trying to build a horizontal menu with images sprites and text

Here is an image of what i want but failing to accomplish with css.

Fig1

my css looks like this.


    #top_menu {
        color: #FFFFFF;
        height: 40px;
        background-color:#222;
        float: right;
    }
    #top_menu ul {
        font-size: 13px;
        margin-top: 13px;
    }
    #top_menu li {
        display: inline;
        list-style-type: none;
        padding-right: 10px;
    }

    .sprite {background:url(images/sprite.png);}
    .transparent {background:url(/images/transparent.png);}
        .contact {height:18px;}


            /*Top menu icons*/
             .sales{width:13px;background-position:-1px -72px;}
             .login{width:13px;background-position:-15px -72px;}
             .forum{width:13px;background-position:-29px -72px;}
                     .livechat{width:13px;background-position:-44px -72px;}

The html part

 <div id="top_menu" class="grid_6">
      <ul id="top_nav">
        <li class="sprite contact sales"><span>Sales:1-800-555-7777</span></li>
        <li class="sprite contact login"><span>Administrator</span></li>
        <li class="sprite contact forum"><span>Forum</span></li>
        <li class="sprite contact livechat"><span>Live Chat</span></li>
      </ul>
    </div>

As you can see, the images are on top of the text and also showing more than one icon.
🙁
Fig2

Can anyone please help me out with this? I don’t want to call each icon by separate.
Thanks a lot!

  • 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-25T09:31:45+00:00Added an answer on May 25, 2026 at 9:31 am

    You’ll have to create your sprites a little differently.

    Instead of putting the icons next to each other, put them on top of each other. That way, all you have to do is adjust the y positioning to get to the icon you want.

    You might also be interested in using one of these tools:

    http://csssprites.com/

    http://spriteme.org/

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

Sidebar

Related Questions

I'm trying to build a horizontal drop down menu with CSS. But the submenu
Trying to learn a bit of CSS and I want a horizontal navbar and
I'm trying to build a simple multi-level UL Horizontal Accordion (or slide menu) in
I'm trying to build a horizontal accordion with Jquery. It seems to be working
I'm trying build a MVC framework, but I'm confused about manage themes. Well... I
Trying to build sslsniff on a RHEL 5.2 system here. When compiling sslsniff on
I am trying to build this very simple (visually speaking) layout using HTML/CSS that
I'm following this tutorial and am trying to modify it to my use: http://net.tutsplus.com/tutorials/html-css-techniques/how-to-build-a-kick-butt-css3-mega-drop-down-menu/
I am trying to build a simple vertical thermometer with CSS. I took some
I am trying to build a simple horizontal list, where each list item is

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.