Wierd issue: Application theme style not finding its images references!?

Discussion in 'ASP.NET 2.0' started by sbekker, May 26, 2008.

  1. Hi there wize and overworkedcoders,

    Firstly this is a sub application/sub site.

    I am using atheme that contains aCSS file and it appears that any aspx pages in subfolders of the sub application picks up issues with the style sheet of the theme and does not display imagesof the styles.

    This style image does not seem to work:

    background-image: url(../../images/sidebar_menu_arrow.gif);
    background-image: url(images/sidebar_menu_arrow.gif);
    background-image: url(/images/sidebar_menu_arrow.gif);
    background-image: url(~/images/sidebar_menu_arrow.gif);
    background-image: url(../images/sidebar_menu_arrow.gif);

    However it appears to work if I reference the style directly in my master page like so:



    <style media="screen" type="text/css" runat="server" src="~/styles/officemax.css" />


    Any suggestions.


    Thanks
     
  2. Hi,
    Typically I use this method for the CSS:
    <link href="App_Themes/main/main.css" rel="stylesheet" type="text/css" />

    And this for the background image:
     
  3. Thx,


    But I am using ASP.NET themes and need this to work. My CSS file being part of the theme.
     
  4. It works for my website.
    Alexei Cioinahttp://www.californiadreamhomesandland.com

     
  5. Anyone any ideas on why themes do not fully work for sub applications?
     
  6. For CSS in the ASP.NET themes this is the correct method:

    body
    {
    background-image: url(images/image.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    }

    Note: In that example "images" is located at: \site\App_Themes\MainTheme\images\
    The CSS file is located at: \site\App_Themes\MainTheme\

    Post Edited (wisemx) : 5/27/2008 1:03:14 PM GMT
     

Share This Page