CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
CSS Combat
[Solved] What selector should i use to target everything EXCEPT?
JohnMotylJr
Permalink to comment
#
August 2012
Howdy yall,
Im basically using
* {
margin:0;
padding:0;
}
How would i say i want
everything
to reset except my
pre
tags?
joshuanhibbert
Permalink to comment
#
August 2012
*:not(pre) { ... }
The browser support is not perfect, as you might expect, not working in IE8 and below.
jamy_za
Permalink to comment
#
August 2012
Obviously
this
doesn't have LTE IE8 support since it's css3
*:not(pre) {
margin:0;
padding:0;
}
I'd recommend using a css reset such as
normalize.css
JohnMotylJr
Permalink to comment
#
August 2012
@joshuanhibbert
,
@jamy_za
Thanks gents, implementing now. I normally use a proper reset but for what im working on, its really so small just needed a quick fix. Thanks again guys.
joshuanhibbert
Permalink to comment
#
August 2012
No worries!
Add a Comment
Im basically using
* {margin:0;
padding:0;
}
How would i say i want
everythingto reset except mypretags?The browser support is not perfect, as you might expect, not working in IE8 and below.
I'd recommend using a css reset such as normalize.css