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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:47:37+00:00 2026-05-24T23:47:37+00:00

I want to optimize my code. I think I am correct in saying that

  • 0

I want to optimize my code. I think I am correct in saying that if I combine multiple images into one file then I can’t use the position attribute unless the images are part of a background image. But I am not sure how to set up my DIV. Do I need to set the width and height of the DIV? Do I need to do display: block or something like that?

Here’s the code that I have so far:

<ul>
<li><a class='disabled' ><img width='16' height='16' src='../../Content/Icons/home.png' />Home</a></li>
<li><a href='xx'  title='xx'><img width='16' height='16' src='../../Content/Icons/xx.png' />xx</a></li>
<li><a href='yy'  title='yy'><img width='16' height='16' src='../../Content/Icons/yy.png' />yy</a></li>
</ul>
  • 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-24T23:47:38+00:00Added an answer on May 24, 2026 at 11:47 pm

    if you have multiple images in one file, I’d recommend you to add some classes, as @pduersteler said.

    ul li a { display: inline-block; position: relative; width: 16px; height: 16px; }
    ul li a.one { background: url('../../Content/Icons/home.png') left top no-repeat; }
    ul li a.two { background: url('../../Content/Icons/home.png') -16px top no-repeat; }
    ul li a.three { background: url('../../Content/Icons/home.png') -32px top no-repeat; }
    

    Something like this…

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

Sidebar

Related Questions

So the situation is: I want to optimize my code some for doing counting
I have the following code: // Dictionary which I want to optimize Dictionary<string, MyClass>
I'm just looking to optimize the code below. It works, but I want to
I want to optimize images with the help of some external programs. The programs
code link: http://jsbin.com/ozoma3/edit codes (can copy/paste to a .html file, and run it) :
Does the java compiler (the default javac that comes in JDK1.6.0_21) optimize code to
Im wondering if I can optimize my pathfinding code a bit, lets look at
I want to optimize this code: InputStream is = rp.getEntity().getContent(); BufferedReader reader = new
I have this statement in my c program and I want to optimize. By
want to open pdf file when a user clicks on hyperlink shown in gridview

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.