?
Solved

Last-child and Internet explorer

Posted on 2010-11-09
3
Medium Priority
?
791 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

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 demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

777 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