You can use the negation pseudo-class :not()
against the :last-child
pseudo-class. Being introduced CSS Selectors Level 3, it doesn’t work in IE8 or below:
:not(:last-child) { /* styles */ }
More Related Contents:
- css selector to match an element without attribute x [duplicate]
- Is there a CSS parent selector?
- Complex CSS selector for parent of active child [duplicate]
- Select every Nth element in CSS
- CSS3 selector :first-of-type with class name?
- CSS Selector that applies to elements with two classes
- Why isn’t it possible to combine vendor-specific pseudo-elements/classes into one rule set?
- CSS selector based on element text? [duplicate]
- Pure CSS checkbox image replacement
- Handling a colon in an element ID in a CSS selector [duplicate]
- How can I correctly select the first or the last child with CSS?
- How to get nth-child selector to skip hidden divs [duplicate]
- CSS selector for attribute names based on a wildcard
- IE8 :nth-child and :before
- CSS selector to select first element of a given class
- Style child element when hover on parent
- How to select the first, second, or third element with a given class name?
- Combine :after with :hover
- What does the dot mean in CSS?
- :active css selector not working for IE8 and IE9
- Can a dynamic class be styled using CSS? [duplicate]
- Is there any pros and cons if i use always CSS Class instead CSS ID for everything?
- Default :target with CSS
- Multiple descendant children selector with css [duplicate]
- Select second last element with css
- How do I give a CSS class priority over an id?
- How to run the CSS3 animation to the end if the selector is not matching anymore?
- Is there a css selector for selecting an element futherup in the html?
- What is the difference between pseudo-classes and pseudo-elements?
- iOS8 Safari after a pushState the :nth-child() selectors not works