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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:25:06+00:00 2026-05-28T04:25:06+00:00

I am having a problem with image paths in my css. My directory structure

  • 0

I am having a problem with image paths in my css. My directory structure is below with folders in bold.

mp.master has a reference in it for menu.css, both of my testpages are using mp as its master page. testpage2.aspx (in the root folder) looks correct, testpage1.aspx (inside of a sub folder) is not able to find images (ie navBG.png) specified in menu.css. If I move testpage1.aspx to the root it works fine.

Other styling in menu.css is applied to testpage1.aspx, just not images.

WebSiteFolder

  • css
    • menu.css
  • img
    • navBG.png
  • SubDirectory
    • testpage1.aspx
  • mp.master
  • testpage2.aspx

In menu.css I have the following:

 .no-cssgradients nav, .no-js nav { padding-bottom:4px; border:none; background:url(../img/navBG.png) repeat-x 0 0; }

What am I doing here? I have tried to state the absolute path with ~/, ./, ../ but nothing seems to work.

  • 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-28T04:25:06+00:00Added an answer on May 28, 2026 at 4:25 am

    I found my answer here How to get JqueryUI to work with ASP.Net Master Pages and multiple paths?. I was making a site to try out some css3/jquery stuff and my problem was not in referencing my css, but in referencing the jquery library.

    this.Page.ResolveURL is your friend here:
    <script type=”text/javascript” src='<%= this.Page.ResolveUrl(“~/resources/js/jQuery.js”)%>’>

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

Sidebar

Related Questions

I'm having a problem using CSS's display:inline property with the list-style-image: property on <li>
I'm having a problem with image scaling. When I use the following code to
I'm having a problem aligning an image to the top the text in an
HI Guys, Here I am having problem that How can I post an image
i am having a problem in adding the image files to project namespace. I'm
Problem: I am having trouble implementing a recursive image lazy load in all relevant
Having a problem getting a TreeView control to display node images. The code below
I am having this problem in the image: even if in the path displayed
am having a problem constructing a query here is simplified tables structure 3 tables
I am having a problem capturing an image and storing it from the native

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.