Please tel me last-child alternate for IE 7,any help will be appreciated
Asked
Active
Viewed 1,445 times
1 Answers
1
As described in this thread: Using the last-child selector. You shouldn't use last-child
as it is not cross-browser compatible.
The solution given is to give a class to your last element so you can style it.
Btw, the W3C specification of CSS2.0 did not validate the use of last-child
even if some browser support it so it can be un-supported in further versions.
-
thanks for reply,But sir , as my all my LI are genric not static,i have solved this by jquery: jQuery('.itemList .news-body-div:last').css('border','none'); }); – Mehmood Khan Aug 01 '11 at 05:40
-
@Mehmood Khan: i'm glad you found a solution to your issue. To be full "stackoverflow-compliant", you can post your comment as an answer and accept it. This is great for avoiding to leave questions unanswered. – JMax Aug 01 '11 at 06:18