Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8584153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:42:20+00:00 2026-06-11T21:42:20+00:00

How do i select the third link to remove the right border? The first

  • 0

How do i select the third link to remove the right border? The first three are text links and I want to remove the right-border from the last text link. The last two are buttons. I don’t want the borders between or at the end of the buttons either. I can’t believe how much trouble I am having with this. Its probably a simple solution but it’s taking me forever to figure it out for browsers. Thanks.

Javascript

<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script language="javascript">
        $(document).ready(function() {
        $("ul.subnavigation li:nth-child(3)").addClass("last-child");
    });
        </script>

HTML

<ul class="subnavigation">
                <li><a href="$sign_in_url" id="Program" rel="nofollow" ></a>Program </li>
                <li><a href="$sign_in_url" id="About" rel="nofollow" >About </a> </li>
                <li><a href="$sign_in_url" id="faq" rel="nofollow" >How to/FAQs</a> </li>
                <li><a href="$sign_in_url" id="register" rel="nofollow" class="btn_register hide-text">Register</a> </li>
                <li><a href="$sign_in_url" id="signin" rel="nofollow" class="btn_signin hide-text">Sign in</a></li></ul>

CSS

ul.subnavigation {  
    font-family:Arial, sans-serif; 
    font-weight:bold; 
    font-size:16px;
    color:#333333; 
    list-style:none;
    }

.subnavigation li{
    display:inline;
    border-right:1px solid #ccc;
}

.subnavigation li:last-child{
    display:inline;
    border-right:0px;
}


.last-child {border:none;}

.subnavigation li a   {
    text-decoration:none;
    padding:0 10px 0 10px;
    line-height:18px;

    }

.subnavigation li a:hover {
    color:#2274ac;
    }


.subnavigation a.btn_register {
    background:url(../images/nt_btn-register.png) no-repeat;
    width:66px; 
    height:23px;
    display:inline-block;
    margin:0 5px 0 0;
    float:right;
    text-indent:-999px;
    }

.subnavigation a.btn_signin {
    background:url(../images/nt_btn-signin.png) no-repeat;
    width:56px; 
    height:23px;
    display:inline-block;
    margin:0 10px 0 5px;
    float:right;
    text-indent:-999px;
    }

.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}

JS FIDDLE here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:42:21+00:00Added an answer on June 11, 2026 at 9:42 pm

    Change your css to be more specific

    li.last-child {border-right:0px;}
    

    then jQuery you can use .slice() to get li elements of index 2> to remove the right border

    $(document).ready(function() {
       $("ul.subnavigation li").slice(2).addClass("last-child");
    });​
    

    http://jsfiddle.net/A46Ka/2/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to select values from three tables. Each table has an buyer_entity_id column.
I want results from three tables where the results from the first table are
Select only showing first character of option text in IE 9 Using click on
When #my-text-link is clicked, i need to select tab 5 and when tab 5
I have the following SQL: SELECT id, url FROM link WHERE visited = false
I have some floated div's and I want to select the third with jquery.
<select id=studentinst size=6> <option value=1>First Installment</option> <option value=2>Second Installment</option> <option value=3>Third Installment</option> <option value=4>Fourth
I want to add two different class attributes to my my first and fourth
SELECT REPLACE([strUrl], '/myoldurl', '/mynewurl') FROM [UrlRewrite] If strUrl is /myoldurl/myoldurl_something_else , it returns /mynewurl/mynewurl_something_else
SELECT Id,Date,Name FROM people WHERE DATEPART(hh,Date) >= 7 AND DATEPART(hh,Date) <= 8 Order by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.