Css getting applied to all pages in angular primeng

Viewed 80

I am using p-dropdown & have applied min-width to p-dropdown panel in two different pages.

In page1 css

.p-dropdown panel {
  min-width: 35% !important;
  } 

In page2 css

.p-dropdown panel {
  min-width: 20% !important;
 }    

When I open page2 after opening page1, then page1 css for p-dropdown panel is getting applied.

2 Answers

Try this in page2 css.

.p-dropdown panel {
  min-width: 20% !important
 } 

Without looking at your entire css/project - in Chrome you can open up Dev Tools, select the element, and view the "Computed" tab to look up what file/css is determining the width.

Related