Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Using CSS to override a background image???

    I'm attempting to write a style sheet for use with the Firefox Extension, "Stylish." (For those unfamiliar, this extension is similar to greasemonkey. It allows the user to make custom CSS stylesheets to customize the style of webpages)

    There is a div element (class="sidebox submit") on the webpage I'm designing a custom user style for, which has an image set as it's background. I have access to the original style sheet that the website uses, and the line that defines this div element is:

    .sidebox.submit {background: url(/static/submit.png) no-repeat scroll center left;}

    I'm trying to replace this background image with a simple color instead.

    Since I'm new to using CSS, I wasn't quite sure how to pursue this. I have tried two strategies so far, both of which were unsuccessful.

    In my first attempt to override the stylesheet of the website with my own user sheet, I tried: (note, for those unfamiliar with the Stylish extension, !important; is required at each value to work properly)

    .sidebox.submit{background: rgb(15,15,15) !important;}

    This didn't work, so I figured maybe I needed to throw in some extra selectors. Since the div of class="sidebox submit" was a child of another div element (class="sidebar"), I figured if I threw in the .sidebar selector, it might add more strength.

    .sidebar .sidebox.submit{background: rgb(15,15,15) !important;}

    This also didn't work though.

    So I'm wondering if anyone would have any ideas as to how to override this background image, and replace it with a color instead.

    Thanks.

    -aedes-

  • #2
    Regular Coder
    Join Date
    Nov 2005
    Location
    North Canton, Ohio
    Posts
    118
    Thanks
    11
    Thanked 4 Times in 4 Posts
    try background: none rgb(15,15,15) !important;

  • Users who have thanked Blaher for this post:

    aedes (07-27-2008)

  • #3
    New to the CF scene
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Excellent! Thank you very much :P


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •