Solved

Last-child and Internet explorer

Posted on 2010-11-09
3
729 Views
Last Modified: 2012-05-10
Hi all,

I am using wordpress and on my menu I;m using last-child on my css.

I'm having issues with internet explorer. Is there anyway I can get last-child to work on internet explorer for my wordpress theme please?

Thanks

0
Comment
Question by:error77
3 Comments
 
LVL 6

Expert Comment

by:stilliard
ID: 34098406
Do you have jquery on your page? if so you could write a jquery fix for it to pick up the last child element for you.
like on here: http://stackoverflow.com/questions/1293369/using-last-child-in-css

last-child doesnt work in several browser versions unfortunatly, so either a javascript fix, or maybe find a way so instead you use first-child, e.g. if your using last child to cancel out a border to the right of each item in a list, maybe change the border to left and use first child to cancel it out.

0
 
LVL 2

Accepted Solution

by:
wasim117 earned 500 total points
ID: 34099670
You can try following code using jQuery last:selector.
<script>
  jQuery("ul.navigation li:last").addClass('last-item');
</script>

Open in new window

0
 

Author Closing Comment

by:error77
ID: 34100369
Thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
This article discusses how to create an extensible mechanism for linked drop downs.
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now