Problem Accessing CSS and Images

Discussion in 'ASP.NET / ASP.NET Core' started by andynelms, Jun 28, 2011.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have a site http://www.4inthefire.org. I have images in /Images and css in /App_Themes/TFL/tflstyles.css

    None of my images are loading and neither is the css. Everything works fine on my local machine with IIS hosting using a virtual directory debugging using Visual Studio 2010.

    I know the theme is being set properly because the name of the theme is TFL and it is set in the page load of the master page and displayed in the Default.aspx page at the root of the site. You will see TFL near the bottom of the page.

    I have links that use absolute addresses and others that use relative addresses and both work. In particular the links to the About pages work as well as the the alternate text link for the image at the top of the pages.

    ANy help would be greatly appreciated.
     
  2. I just looked over what I could and you do have this correct:
    <link href="App_Themes/TFL/tflStyle.css" type="text/css" rel="stylesheet" />

    But it doesn't look like you have a closing </head> tag.

    A little trick to make sure your Master Page settings get loaded properly is to add a virtual reference to it in your code pages, the ones that call the Master Page, like this:

    <%@ Page Title="Test" %>
    <%@ MasterType VirtualPath ="~/main.master" %>
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page