This selector doesn’t work. Is it really possible?
See this http://jsfiddle.net/Hd7VZ/
.x-form-fieldset:last-child:not(x-item-hidden) {
border-bottom: 0;
}
One of solution is this http://jsfiddle.net/8Fpyu/
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The comment by antejan is correct, currently you’re selecting the
.x-form-fieldsetwhich is:last-childin its block. If you want to select the:last-childwithin.x-form-fieldsetthen this is the correct syntax:However even if the last item is hidden it is still
:last-child, so adding the:notwill achieve nothing in your example.There is nothing in CSS at present which allows you to ignore non-visible elements, as you can see from this small modification of your example simple effects like alternate striping are also broken by hiding elements. This may be a worthwhile addition to a future version of CSS, you could try suggesting it to the W3C CSS Working Group and seeing if they think it’d be worth adding to a future version of the selectors spec (CSS Selectors Level 4 is going through the standards process right now, but ideas are being accepted for CSS5 Selectors).
In the meantime, you’re stuck with either finding an alternative markup approach, or hacking it in JavaScript.