Multiple CSS not selectors.


#1

Hey I can’t find a solution on Google.

I want to have multiple CSS :NOT Selectors but both ways I’ve tried doesn’t work.
The resolution is, that also other #left-contents (without the class blogpage or eventpage) get the css commands. If I would remove the second not-class, it would work fine.

But what I want is that both classes are excluded

Any Ideas?

#left-content :not(.blogpage, .eventpage) img
#left-content :not(.blogpage) :not(.eventpage) img

#2

No Ideas, but if you’re working on something for TF then remember that :not isn’t IE8 friendly :frowning:


#3

EDIT: posted an option, but tested and doesn’t work. Sorry


#4

Maybe with a little bit of jQuery - http://api.jquery.com/not-selector/ ?


#5

How about this, assuming .blogpage & .event page are divs, asigning them a second, shared identifier class;

#left-content div:not(.xyz) img

EDIT: Just realized I got the wrong end of the stick… ugh :frowning:


#6

Hm I didn’t want to use jquery for that.

So I could not use :not selectors because of IE8??? What should I do instead?
But I also saw themes without IE8 support here on Themeforest


#7

Got it:

http://jsfiddle.net/RM8nZ/27/


#8
pezflash said

Got it:

http://jsfiddle.net/RM8nZ/27/

Doesn’t work in FF 16


#9
RubenBristian said
pezflash said

Got it:

http://jsfiddle.net/RM8nZ/27/

Doesn't work in FF 16

Really? F*, created on FF17.

EDIT: strange, it works on IE9, Chrome and Opera.


#10

thanks for your enthusiasm in solving this problem :wink:
yeah I already tried :not(.eventpage):not(.blogpage) too. Doesn’t work for me in FF 16


#11

There was a post recently from Ivor about IE8 support - if you don’t declare IE8 support then you’ll get a soft-reject, if you declare it and don’t support it you’ll get unhappy buyers.

I know there’s some out there that don’t support it, but that doesn’t mean the rest of us will get away with it for now :wink:


#12
LovelessDesign said

thanks for your enthusiasm in solving this problem :wink:
yeah I already tried :not(.eventpage):not(.blogpage) too. Doesn’t work for me in FF 16

Seems pretty strange to me, that it works on IE9, Chrome, Opera and FF17, but not on 16. v17 has not been a major update.


#13

for me, this doesn’t work in other browsers too, because it doesn’t exclude eventpage:

#left-content :not(.blogpage):not(.eventpage)

When using

#left-content :not(.blogpage, .eventpage)

it does exclude both. But it also exclude all other left-contents


#14

for me, this doesn’t work in other browsers too, because it doesn’t exclude eventpage:

#left-content :not(.blogpage):not(.eventpage)

When using

#left-content :not(.blogpage, .eventpage)

it does exclude both. But it also exclude all other left-contents


#15

But your isfiddle does work in all browsers.
But not with my code

 #left-content :not(.blogpage):not(.eventpage) .thumbnail img 

#16

Oh I’ve found another error with my code.
pezflash was right and it works in all browsers (except ie8, of course). thank you