CSS background image not showing up

Posted on 2012-08-27
Last Modified: 2012-08-27
On this test page:

The links with class="mobilenav2" have CSS like this:

.mobilenav2{background-image:url('img/mb_darkbutton1.jpg');background-repeat:repeat-x;margin:0 0 0 0;padding:1em 0 1em 1em;display:block;font-weight:700;font-size:0.8em;}

Open in new window

However, I can't get the background image to show up:

Its just a gradient I want to stretch across the width of the links. Am I doing something wrong?

Thank you!
Question by:bbdesign
    LVL 15

    Accepted Solution

    put in the full url
    LVL 23

    Assisted Solution

    Use this..

    LVL 15

    Expert Comment

    by:Ess Kay
    and the quotes might be an issue

    Author Comment

    Thanks guys. I found the problem, I needed ../img/ because the style sheet is in a folder on level down.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    "I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
    This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now