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

The Archive Base Latest Questions

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

This is probably a newbie question, but is it possible to add a sprite

  • 0

This is probably a newbie question, but is it possible to add a sprite icon to a label with text?

ex:

<label class="icon">labeltext</label>

<style>
 .icon {
    width: 30px
    height: 30px;
    background: url("icon.png") no-repeat scroll 0 0 transparent;
 }
</style>

When I set the width to 30px, the whole text isn’t showing. Is there a way to have a sprite icon and a text inside a div / label / span ?

My real code looks more like this

<span class="additional-background">
    <span>text text text text</span>
</span>

If i set the width / height on the additonal-background where the sprite-icon is you can not see the text inside the text span. And if I set width on text span I can’t manage to make a click-event on the “additional-background”.

Additional
I need to manage to have a click event on the icon, and not the text

  • 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-30T16:38:24+00:00Added an answer on May 30, 2026 at 4:38 pm

    Try this:

    HTML

    <label class="icon">labeltext</label>
    

    CSS

    .icon {
      display: inline-block;
      line-height: 30px;
      padding-left: 30px;
      background: url("icon.png") no-repeat scroll 0 0 transparent;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this is probably a newbie question, but is it possible to do
This is probably a really newbie question (well, I'm pretty sure it is), but
I realize this is probably a hopelessly newbie question, but what is the difference
This is probably a really stupid newbie-sounding question to you developer type people, but
This is probably a very newbie question but what I'm trying to do is
I know this probably must be a newbie question, but since I don't know
Okay, this is probably a very newbie question, but how can I get to
Probably this is a newbie question :) But I have some Flash games built
This is probably a newbie question, but how can I pause and resume my
This is probably a newbie question, but I can't seem to think of 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.