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 8398217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:59:27+00:00 2026-06-09T20:59:27+00:00

I have the following divs: <div id=container> <div class=different_class></div> <div class=child></div> <div class=child></div> <div

  • 0

I have the following divs:

<div id="container">
    <div class="different_class"></div>
    <div class="child"></div>
    <div class="child"></div>
    <div class="child"></div>
    <div class="child"></div>
</div>

I want to apply a border to all the children divs with (.child), except the first one. so in the end all the children divs except (.different_class) and (.child:eq(0)) (I don’t want to use nth-child as in the real problem I might not have .different_class div) will have the border.

I think the solution might be to use :not() selector, but I’m not quite sure how. Thanks’

  • 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-09T20:59:29+00:00Added an answer on June 9, 2026 at 8:59 pm

    try this http://jsfiddle.net/5XuE3/

    #container div.child + div.child
    {
    border: solid 1px black;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If you have the following divs: <div class=container> <div class=something>some text</div> </div> <div class=container>
All, Say I have the following divs: <div id=rotate_container> <div class=reviews id=item1>This is item
I have a page with the following two divs: <div id=searchResults> </div> <div class=postSearchOptions
I have three divs with the following css: div#container { width: 780px; } div#photos
I have a container div with the following attributes: #cat_container{ margin:0; padding:5px; border:1px solid
I have multiple divs (haveing same class names). I want to move the div
Suppose I have a page with the following content: <div><p>Some content</p></div> <div id=container><p class=destroy>Some
I have a set up of the following HTML <div class=container> <div class=box>Content</div> <div
I have the following html divs : ... <body> <div id=barChart_div style=width: 600px; height:
I have the following structure, one outer div (#results) and about 20 divs with

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.