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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:12:48+00:00 2026-06-09T11:12:48+00:00

I am totally a noob to css and I have a need to add

  • 0

I am totally a noob to css and I have a need to add gradient to the background image on the top of the page.
here is what I tried but obviously its not working as background overwriting the value. How can I fix it

I have a background image and I need a gradient on top of it. Here is my css

body.test {
    /* Mozilla: */
    background: -moz-linear-gradient(top, #00FF00, #000000);
    /* Chrome, Safari:*/
    background: -webkit-gradient(linear,
    left top, left bottom, from(#00FF00), to(#000000));
    /* MSIE */
    filter: progid:DXImageTransform.Microsoft.Gradient(
        StartColorStr='#00FF00', EndColorStr='#000000', GradientType=0);
background: url(../mybackground.png);
}

TEST HERE
http://jsfiddle.net/PsDuF/

  • 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-09T11:12:50+00:00Added an answer on June 9, 2026 at 11:12 am

    change

    background: url(../mybackground.png);
    

    to

    background-image:  url(../mybackground.png);
    

    background is the shorthand syntax. Alternatively, you could combine the image with your other syntax:

    background:  url(../mybackground.png), -moz-linear-gradient(top, #00FF00, #000000);
    

    In your case, you are declaring background multiple times, so each time you declare it, you are over-riding the previous declaration.

    When you declare multiple background in one declaration, the order you declare them will change the stacking order. JSBIN example using images and mozilla background gradients: jsbin.com/abumuz/1

    Note that if you want the gradient on top of the image, but still want to see the image, you need to make sure your gradient has alpha transparency.

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

Sidebar

Related Questions

Ok. very much totally noob question but I really don't have a clue and
Totally a PHP noob here so sorry for the possibly basic question - here
Totally confused here. I have a PARENT UIViewController that needs to pass an NSMutableArray
I need to make an installer for a MySQL 5.1 Database, but I'm totally
Totally revising this question, since I fixed the first issue but have ran into
Sorry for question, but I'm totally noob in Java. What is the best practice
So, i'm a total noob with codeigniter but i'm getting by. I have a
Totally confused about the data types required here. I have this Linq statement: var
I am a totally noob at CakePHP and have been dealing with this site
am totally new to Javascript , but i need it for using googlemaps in

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.