locked
When navigating css stylesheet stays from last page

    Question

  • When I navigate from one page to another using single page navigation  WinJS.Navigation, the css from the last page stays. Also it stays when moving backwards and the current page css isn`t loading. Is there any easy solution for this?

    /I have one in mind - add class to page and then to all css rules, but there must be easier one/

    Thursday, April 18, 2013 7:58 PM

Answers

  • Hi L,

    Once loaded the css stays loaded.  If you load a NEW page that new css could override the previous.

    You cannot undefined the css style.  Best to have a appwide css style and have page specific styles  mainpageDIVstyle etc...

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, April 18, 2013 8:12 PM
    Moderator

All replies

  • Hi L,

    Once loaded the css stays loaded.  If you load a NEW page that new css could override the previous.

    You cannot undefined the css style.  Best to have a appwide css style and have page specific styles  mainpageDIVstyle etc...

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, April 18, 2013 8:12 PM
    Moderator
  • Ok thanks, then I`m going to add class for all the content div, and then add that specific page class to every rule in CSS (or maybe there is a way to add it for every rule using one line?)
    • Marked as answer by LatApps Saturday, April 20, 2013 9:09 AM
    • Unmarked as answer by LatApps Saturday, April 20, 2013 9:09 AM
    Friday, April 19, 2013 4:43 AM