Grow your CSS skills. Land your dream job.

What selector should i use to target everything EXCEPT?

  • # August 14, 2012 at 5:11 am

    Howdy yall,
    Im basically using

    * {
    margin:0;
    padding:0;
    }

    How would i say i want everything to reset except my pre tags?

    # August 14, 2012 at 5:22 am
    *:not(pre) { ... }

    The browser support is not perfect, as you might expect, not working in IE8 and below.

    # August 14, 2012 at 5:23 am

    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

    # August 14, 2012 at 5:28 am

    @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.

    # August 14, 2012 at 7:11 am

    No worries!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".