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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:26:43+00:00 2026-06-07T17:26:43+00:00

I am trying to add a background image to a button (or link with

  • 0

I am trying to add a background image to a button (or link with the same class) which already has a background color.

Here is the jsfiddle: http://jsfiddle.net/BNvke/

The button looks great by itself, but I am trying to make it so that if I add a certain class, the padding will be adjusted and a background image will be displayed, however the image does not show. Here is the CSS/HTML:

.button {
    padding: 10px; 
    margin-right: 8px;
    margin-bottom: 10px;
    font-family: Arial, Tahoma, Verdana, FreeSans, sans-serif;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
    display: inline-block;
    white-space: nowrap;
    line-height: 1em;
    position: relative;
    outline: none;
    overflow: visible;
    cursor: pointer;
    border-radius: 4px;
    -moz-border-radius: 4px; 
    -webkit-border-radius: 4px; 
    box-shadow: 1px 1px 2px 0 #CCCCCC;
    -moz-box-shadow: 1px 1px 2px 0 #CCCCCC;
    -webkit-box-shadow: 1px 1px 2px 0 #CCCCCC;
}

.button_blue {
    border: 1px solid #305875;
    color: #FBFBFB;
    background-color: #3D6E97;
}

.button_blue:hover {
    color: #FBFBFB;
    opacity: 0.9; 
    filter: alpha(opacity=90);        
}

.button_about { 
    background-image: url(http://i47.tinypic.com/2ni0ahd.png) 3px 5px no-repeat;
    padding-left: 35px;
    padding-right: 15px;
}​
<p><a class="button button_blue">Without Background</a></p>

<p><a class="button button_blue button_about">With Background</a></p>​

How can I get that background image to show?

  • 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-06-07T17:26:44+00:00Added an answer on June 7, 2026 at 5:26 pm

    see http://jsfiddle.net/BNvke/1/

    just change

    background-image url(http://i47.tinypic.com/2ni0ahd.png) 3px 5px no-repeat;
    

    with

    background: url(http://i47.tinypic.com/2ni0ahd.png) 3px 5px no-repeat;
    

    and move up the last rule so the rule about background-color defined for .button_blue can be applied on cascade

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

Sidebar

Related Questions

Hi I am trying to add background image to my link. The image contains
I'm trying to have an image (as the background) on a button and add
I'm trying to create a CSS3 button which includes an image using multiple background.
I am trying to add a background image to a view. The image is
Im trying to add a centered background image behind a JTable in a JScrollPane.
I am trying to display a background image for a button. The button is
I'm trying to add an in-background alarm clock feature to an app I'm developing.
I am trying to add watermark with transparent background on OSX with ffmpeg. I
I'm trying to add a gradient to the background of a LinearLayout, and it
I'm trying to add an overlay to a MapView from a background thread to

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.