Solved

Last-child and Internet explorer

Posted on 2010-11-09
3
765 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This article discusses how to create an extensible mechanism for linked drop downs.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

856 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