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

  • Home
  • SEARCH
  • 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 7541107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:48:28+00:00 2026-05-30T07:48:28+00:00

I want to use background image and color for the same element but id

  • 0

I want to use background image and color for the same element
but id doens’t work even I use the css like this question

here’s my css
http://jsfiddle.net/xdkwB/

  • 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-30T07:48:30+00:00Added an answer on May 30, 2026 at 7:48 am

    Your CSS is working correctly, both the image and background colour sit within the one container so because they’re the same colour, you can’t actually see the arrow.

    The best way to solve this is to use an outer div that wraps your header element, like so:

    <div class="outer"><h1></h1>​​​​</div>​​​​​​​​​
    

    And then style with appropriate CSS:

    div {
       float: right;
       width: 198px;
       background-image:url(http://s14.postimage.org/nitv9x7ct/top_Arrow.png);        
       background-position: 0px;
       background-repeat: no-repeat;
       margin-top:21px;
    }
    
    h1{
        color:white;
        font-size: 170%;
        font-weight: normal;
        font-family: arial;
        width:189px;
        height:33px;
        line-height: 33px;
        background-color: #b21f23;
        float:right;
    }
    

    So to clarify, the outer div is slightly larger and contains the background image aligned to the left and then the header fills all remaining space with the background colour. ​

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

Sidebar

Related Questions

I'm looking to use a blank div element to display a background image but
In css you may normally set both a background-image, and a background-color, and the
I want to generate tooltip based on a dynamically changing background image in css.
I am trying to use css to have a background image with opaque attributes
I want to use a background image to highlight text in a paragraph. I
I want to use an ajax loader while loading the page with transparent background.
I have multiple webpages that work together. Most of them have the same css
I want to change the background-color for the last menu item clicked in the
I am making a background in the body element but when I make a
I've never dealt with a website like this before, but here's what I'm trying

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.