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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:31:03+00:00 2026-06-11T22:31:03+00:00

Example: http://jsfiddle.net/JUmHG/3 When mouse is over on a LI, the top/bottom border of the

  • 0

Example:

http://jsfiddle.net/JUmHG/3

When mouse is over on a LI, the top/bottom border of the LI becomes transparent (replaced by background-color).

But also the bottom-border of the previous LI and the top-border of the next LI must be transparent as well. Can this be done with CSS ?

  • 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-11T22:31:04+00:00Added an answer on June 11, 2026 at 10:31 pm

    You cannot select the previous sibling, but you can try some tricks to get the desired effect.

    Like this:

    demo

    Use just border-top & an inset box-shadow on every list item but the fist one in order to mimic the etched top border.

    li{
        border-top: 1px solid #999;
        box-shadow: inset 0 1px 0 #fff;
        padding: 10px;
    }    
    li:first-child{
        border-top: 0;
        box-shadow: none;
    } 
    

    Then remove it on hover for the current item and the item that comes right after it.

    li:hover, li:hover + li {
        border-color: transparent;
        box-shadow: none;
    }
    

    This works in all browsers that support box-shadow (that is, everything except IE8 and older and less capable mobile browsers).

    The same effect could be achieved in IE8 by using an absolutely positioned pseudo-element that is given top: 0; left: 0; height: 1px; width: 100%; background: #fff; (and even in IE7, by adding a child to the list item instead of the pseudo-element). However, I think it’s overkill, especially since the original method degrades gracefully.

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

Sidebar

Related Questions

please see this example: http://jsfiddle.net/qTjdX/ I want the red border-bottom to show as 1
I want to apply on top of background-image .page-header .icon1 For example: http://jsfiddle.net/fR5F6/ <table>
Here an example http://jsfiddle.net/h6PLV/ background:none; On Google Chrome have white color around the select
Here is the example: http://jsfiddle.net/FdT23/4/ The goal is that when you hover your mouse
Here an example http://jsfiddle.net/EhLsT/ $(window).scroll(function () { if ($(window).scrollTop() > $(#header).offset().top) { $(#floating).show(); }
Example: http://jsfiddle.net/xUrDc/ I'm trying to surround each li with a border exactly one pixel
Example: http://jsfiddle.net/NBWmU/1/ I'm using the following CSS to make the background of my div
See this jsfiddle for example: http://jsfiddle.net/FrJRA/1/ and note that the inner span's border overlaps
Example: http://jsfiddle.net/wCFBw/25/ input { color: black; } <input type=text value=This is black /> <input
Here is an example: http://jsfiddle.net/cB3jZ/15/ When you scroll to the bottom of the textarea

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.