0

In my win8 app have 2 pages. Page1.html and page2.html . Page1 has reference to ui-light.css and then page1.css. Page2 has reference to ui-light.css and page2.css.

ui-light.css has a rule defined for disabled state of select boxes. on page1.css I have overridden the select disabled style in this way.

select:disabled{
   background-clip: padding-box 
   background-color: rgb(45, 44, 44) 
   border-bottom-color: rgba(128, 128, 128,1) 
   border-left-color: rgba(128, 128, 128,1) 
   border-right-color: rgba(128, 128, 128,1) 
   border-top-color: rgba(128, 128, 128,1) 
   color: rgba(128, 128, 128,1) 
}

This works fine. But when I navigate from page1 to page2, all the select boxes in page2 have the same style(style in page1.css). How do I make sure this does not happen? I want the select boxes in page2.css to continue to use the style in ui-light.css.

I tried defining the style based on id, using !important. Nothing seems to work.

Any ideas?

YD1m
  • 5,845
  • 2
  • 19
  • 23
Nisha Shukla
  • 159
  • 1
  • 6
  • Please don't make a separate stylesheet for each page. – Tdelang Aug 02 '13 at 10:06
  • keep styles in same css, just have different names for classes or different ids, dont create 2 css files – Deepanshu Goyal Aug 02 '13 at 10:07
  • That is how the app is currently designed... one for each page and for various reasons I cannot change that now... any other ideas? does it stick because I am generically defining fo a select? I tried defining for an id but the style still sticks... – Nisha Shukla Aug 02 '13 at 10:17

1 Answers1

0

Load css for specifc pages..dont mention the stylesheet page1.css in the headtag of the page2.html

Arun Bertil
  • 4,598
  • 4
  • 33
  • 59