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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:01:05+00:00 2026-06-13T09:01:05+00:00

How do you create borders around list items with a custom border on the

  • 0

How do you create borders around list items with a custom border on the left side of the item?

like this:

http://www.dar-ling.com.php53-12.dfw1-1.websitetestlink.com/wp-content/themes/darling/img/filters.png

I have considered using css 3 angles….but I can’t achieve an inner circle or hole…with borders…and it’s likely more tedious than using images somehow.

I am now considering doing this with background images…and have turned off the border on the left side and am trying to get a graphic to position itself on the left edge of the item but no luck. My items all have varying lengths and they are floated left items in a horizontal slider to make it even more complicated.

I also need different hover and active styles as shown in the graphic.

And finally I need to provide a round styled circle or elipse that can hold a number associated with the qty of items in the category and have that attached to the upper right of the styled list item box.

This is my progress so far:

HTML:

<div class="filters">
                <div class="filters-inner">
                      <ul id="filters-slider" class="filters-list">
                    <li><a href="#">Darling</a></li>
                    <li><a href="#">Online Audience</a></li>
                    <li><a href="#">Digital Strategy</a></li>
                    <li><a href="#">Creative</a></li>
                    <li><a href="#">Mobile</a></li>
                    <li><a href="#">eCommerce</a></li>
                    <li><a href="#">Social Media</a></li>
                    <li><a href="#">Search</a></li>
                    <li><a href="#">Advertising</a></li>
                    <li><a href="#">Ramblings</a></li>
                    <li><a href="#">Ideas</a></li>
                    <li><a href="#">Newy New</a></li>
                    <li><a href="#">Freshy Fresh</a></li>
                    <li><a href="#">Search</a></li>
                    <li><a href="#">Advertising</a></li>
                    <li><a href="#">Ramblings</a></li>
                    <li><a href="#">Ideas</a></li>
                    <li><a href="#">Newy New</a></li>
                    <li><a href="#">Freshy Fresh</a></li>

                </ul>
          </div>
</div>

CSS:

.filters {
background-color: #fff;
padding-top: 3px;
padding-bottom: 5px;
width: 1145px;
height: 45px;
float: left;
-webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 -1px 10px rgba(0, 0, 0, 0.1);

}
 .filters-inner {
width: 1140px;
margin-right: auto;
margin-left: auto;
font-size: 11px;
overflow: hidden;
color: #999;
    -webkit-border-radius: 0;
      -moz-border-radius: 0;
      border-radius: 0;

 }
ul.filters-list {
text-align: center;
white-space: nowrap;
display: inline-block;
padding-top: 10px;
}
ul.filters-list li {
float: left;
list-style-type: none;
padding-top: 2px;
padding-right: 20px;
padding-bottom: 2px;
padding-left:20px;
background-color: #fff;
margin-right: 10px;
margin-left: 10px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: none;
border-top-color: #CCC;
border-right-color: #CCC;
border-bottom-color: #CCC;
border-left-color: #CCC;
background-image: transparent url(http://www.dar-ling.com.php53-12.dfw1-1.websitetestlink.com/wp-content/themes/darling/img/leftside_tag_up.png);
background-repeat: no-repeat;
background-position: left center;
}
ul.filters-list li:hover {
background-color: #ECECEC;
background: transparent url(http://www.dar-ling.com.php53-12.dfw1-1.websitetestlink.com/wp-content/themes/darling/img/leftside_tag_hover.png) no-repeat left center;
}ul.filters-list li a {
color: #666666;
font-weight: bold;
}
ul.filters-list li a:hover {
text-decoration: none;
}

div.sample {
padding-top: 200px;
}

​

Does anyone know how to do this correctly?

  • 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-13T09:01:06+00:00Added an answer on June 13, 2026 at 9:01 am

    Here’s a solution that works with a background image sprite. In a nutshell, I’m using the tag for the entire “price tag” shape (easier for the user to click on), and a background sprint for the hover/active state. I’m also wrapping the “quantity” number in a span tag.

    Solution Example: http://jsfiddle.net/alexroper/zhrwA/34/

    Here is the HTML for the “price tag” list:

    <ul id="filters-slider" class="filters-list">
      <li><a href="#">Darling</a> <span class="tag-qty">103</span></li>
      <li class="active"><a href="#">Online Audience</a> <span class="tag-qty">9</span</li>
      <li><a href="#">Digital Strategy</a> <span class="tag-qty">20</span></li>
    </ul>
    

    Here are the styles that build that “price tag” :

    ul.filters-list {
      text-align: center;
      white-space: nowrap;
      display: inline-block;
      padding-top: 10px;
    }
    ul.filters-list > li {
      color: #666666;
      font-weight: bold;
      float: left;
      list-style-type: none;
      line-height: 26px;
      margin-right: 10px;
      margin-left: 10px;
      position: relative;
    }
    ul.filters-list > li > a {
      color: #666666;
      padding: 0 18px 0 24px;
      background: url('https://www.dropbox.com/s/n8e74eikwf82vks/tag_sprite.png?raw=1') 0 0 no-repeat;
      border-right: 1px solid #ccc;
      display: block;
    }
    ul.filters-list > li > a:hover,
    ul.filters-list > li.active > a {
      text-decoration:none;
      background-position: 0 -30px;
    }
    

    And these styles create the “quantity” number:

    .filters-list .tag-qty {
      position: absolute;
      top: -8px;
      right: -9px;
      border: 1px solid #bbb;
      line-height: 16px;
      display: inline-block;
      padding: 0 5px;
      background: #fff;
      -webkit-border-radius: 9px;
              border-radius: 9px;
         -moz-background-clip: padding; 
      -webkit-background-clip: padding-box; 
              background-clip: padding-box;
      -webkit-box-shadow: 0px 0px 3px 0px #ccc;
              box-shadow: 0px 0px 3px 0px #ccc;
    }
    .filters-list .active .tag-qty {
      background:#ebebeb;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for the best way to create a custom border around an HTML
I have a list of items displayed horizontally. I want to create a border
Can anyone advise me on how I can create a border around photos (like
I would like to create a script that will create a border around specific
Hi guys i'm trying to create this (image) css border around a div, but
I need to create control to draw border around its child. So, I have
I'd like to create a UIButton with an image that has no borders (a
I want to create a dialog with a title, borders (left, right, bottom) as
I'm trying to understand this webpage: http://www.canadianliving.com/food/slow_cooker_beef_stew.php It is divided into several sections where
I know that I can create two different borders for my item groups and

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.