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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:36:56+00:00 2026-05-13T23:36:56+00:00

I need to style a regular html list like the following picture: as you

  • 0

I need to style a regular html list like the following picture:

alt text

as you see each each list item has a padding on the sides and a top&bottom border. When hovered the border has a width of 100% of the <ul> item.
Now the problem actually is: when you give each <li> element a top & bottom border I have a border of 2 px between each element (bottom border from the first element and the top border from the second element), I don’t want that however I do not know any solution for this.

my html:

<div id="tab_top" class="tab">
        <div class="bottom">
          <div class="cont">
            <ul>
              <li><a href="#">Here’s a Sample Post <span class="ct">32</span></a></li>
              <li><a href="#">Here’s a Sample Post <span class="ct">32</span></a></li>
              <li><a href="#">Here’s a Sample Post <span class="ct">32</span></a></li>
              <li><a href="#">Here’s a Sample Post <span class="ct">32</span></a></li>
              <li><a href="#">Here’s a Sample Post <span class="ct">32</span></a></li>
              <li><a href="#">Here’s a Sample Post <span class="ct">32</span></a></li>
              <li><a href="#">Here’s a Sample Post <span class="ct">32</span></a></li>
            </ul>
          </div>
        </div>
      </div>

my css:

#tabs .tab div.cont ul li a{line-height:30px; height:30px; color:#3ca097; display:block; padding-left:11px; padding-right:13px; width:259px;}
#tabs .tab div.cont ul li a span.ct{float:right;background:url(images/count_comments.gif) no-repeat left top; height:13px; padding-left:16px; margin-top:10px; line-height:12px;}
#tabs .tab div.cont ul li a:hover{color:#fff; background-color:#6fd2c8; border-top:1px solid #7db9b2;  border-bottom:1px solid #7db9b2; height:28px; line-height:28px;}
#tabs .tab div.cont ul li a:hover span.ct{background-position:left bottom; color:#23665f; margin-top:9px;}

I would be pleased if you can help me

Yours truthfully

  • 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-13T23:36:57+00:00Added an answer on May 13, 2026 at 11:36 pm

    If you use border-top and border-bottom, you are correct, you will get a 1px border, if however you use both, then specify li+li like so:

    .tab div.cont ul li { border-top: 1px solid black; border-bottom:1px solid black; }
    .tab div.cont ul li + li { border-top:none; }
    

    You will get what you claim to want.

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

Sidebar

Related Questions

I've got an HTML select box that I need to style. I'd prefer to
How to change color of selected ListPicker Item in Full Mode? What style need
I need to apply a style on a recurring element which has a fixed
I have a list of library filenames that I need to filter against regular
I have the following code in about 300 HTML files, I need to replace
I need something like this : Regex validSelector = new Regex(^[.#a-zA-Z0-9_:[] ]+[,><a-zA-Z0-9_~=\\:[] ]*$); Has
I need to style the default delete button on a tableview cell in objective
I need to style a ton of different elements (read: cells) in a PDF
I need to style the browse button of file upload in GWT.... I found
I need to use unix Style line endings (only LF) in Zend Studio 8/9

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.