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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:28:41+00:00 2026-06-14T19:28:41+00:00

I have several divs arranged horizontally next to each other with a black border

  • 0

I have several divs arranged horizontally next to each other with a black border of 1px. They overlap on left/right sides. I don’t want to add margin as that would cause the border to be 2px when elements are next to each other.

When a user hover’s over the border changes to white color. The issue is that the second element(and others after first element) have their left border hidden behind the previous element and it appears that the left border doesn’t change color. How can I make the hovered element be on top? I tried z-index with no change at all.

.upcoming a:before{
    display:block;
    content:'';
    position:absolute;
    width:184px;
    height:277px;
    border:1px solid #666;
}

.upcoming a:hover:before{
    border-color:#CCC;
}

(I am using :before for different reasons than border – overlapping box shadow)

Edit: added picture

In this screenshot “the fall” poster is hovered an it is zoomed in quite a bit too. Notice that the left border is not lighter color(because it is overlapped by the fists border).

enter image description 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-14T19:28:43+00:00Added an answer on June 14, 2026 at 7:28 pm

    Although you have already tried, I think z-index is the best option here. It is designed purely for being able to manage the z-position of each element.

    See this jsfiddle for example:

    http://jsfiddle.net/CjYa9/1/

    Perhaps you were doing something different.

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

Sidebar

Related Questions

I have several DIVs that I want to place beside each other, but because
Basically I have several divs, each contains a question. This question could be presented
So I have several DIVs called achievement, and each one contains a span called
I basically have several divs each with ids id_1, id_2 id_3 etc. The divs
I have several div s on top of each other. The top one needs
I have several divs, which are made automatically by php script. Each div have
I have several divs on a page. Each div has a heading which I
I have several divs that are generated dynamically after a file is uploaded. Each
I have several divs that are generated dynamically after a file is uploaded. Each
I have several divs on my page. Each of them has the title attribute

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.