Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i remove all attributes from any css selector? To override and reset any css id selectors?

Tags:

css

#search-box {
-moz-border-radius-bottomleft:0px;
-moz-border-radius-bottomright:0px;
background-color:#ffffff;
border:0px solid #CCCCCC;
float:right;
padding:8px;
position:relative;
top:0;
width:20em;
}

#search-box {
/*remove all css declaration here*/
}
like image 376
mehmet Avatar asked Feb 03 '10 14:02

mehmet


1 Answers

You can't. You would have to manually reset each of them. If you need to jump between major differences, when a user clicks the element, for instance, you can remove these from the element itself, and put them in a class. So this:

#search-box {
  color:blue;
}

Becomes this:

#search-box {
  color:red;
}
#search-box.focused {
  color:blue;
}

Now any time you need to make radical changes to the display of an element, add or remove the .focused class.

like image 74
Sampson Avatar answered Oct 24 '22 13:10

Sampson