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

  • Home
  • SEARCH
  • 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 7041433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:02:43+00:00 2026-05-28T02:02:43+00:00

Take a look at this fiddle – I’ve got three divs which all have

  • 0

Take a look at this fiddle – I’ve got three divs which all have a border-width of 2px. The original problem was because each div has a border-width of 2px, the border gets duplicated in between each div, giving a total border-width of 4px. I fixed this by adding a margin-top of -2px on every div. This causes the divs to cover up the border of the one above, achieving what looks like even borders all round.

I wanted to add a hover effect to my divs, so I added the following CSS:

#main div:hover {
    border-color:#09C;
}

The trouble is, because the borders of the top two are covered up by the divs below them, the hover effect doesn’t look right (the bottom border of each div doesn’t appear to get highlighted).

I want to be able to have a 2px border only between each div, whilst having a hover effect for the entire border of that div… how can I do this?

  • 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-05-28T02:02:44+00:00Added an answer on May 28, 2026 at 2:02 am

    You can add another selector that colors the top border of the next div when a div is hovered:

    #main div:hover + div {
        border-top-color:#09C; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please take a look at this fiddle: http://jsfiddle.net/d3uc9/4/ I have a problem with this,
Take a look at this fiddle . Quick info: The div is 500px wide
Take a look at this example code, which doesn't work: <?xml version='1.0' encoding='UTF-8' ?>
Take a look at this; http://jsfiddle.net/k2zyz/ Why is the 100% width tab exceeding the
Take a look at this Fiddle . I'm puzzled as to why #wrapper doesn't
Possible Duplicate: .prop() vs .attr() Please take a look at this fiddle: http://jsfiddle.net/DGzvP/ $(#test).prop({
Please take a look at this fiddle: http://jsfiddle.net/hughbe/QYGcq/ As you can see, the label
please take a look at this fiddle : http://jsfiddle.net/cX47v/1 I am simply trying to
Take a look a this . I'm accessing the button's height and width using
take a look at this example code: public class Comment { private Comment() {

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.