Jump to content

cart item numbers


S4hosting

Recommended Posts

Hi how to bring the item cart number in to that cart icon blue colour number place? here i have the shared the code with style kindly help in this....

 

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css">
<style>
.navbar-nav.toolbar{
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: left;
    font-family: 'Open Sans',sans-serif;
    box-sizing: border-box;
    margin-top: 0;
    display: flex;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    flex-direction: row;
    }

.nav-item.ml-3            {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    font-family: 'Open Sans',sans-serif;
    list-style: none;
    box-sizing: border-box;
    margin-left: 1rem!important;
    }

.btn.nav-link.cart-btn{
    font-family: 'Open Sans',sans-serif;
    list-style: none;
    box-sizing: border-box;
    text-decoration: none;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: transparent;
    line-height: 1.5;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    display: block;
    overflow: hidden;
    cursor: pointer;
    padding: .5rem 1rem;
    border-radius: .25rem;
    border: 1px solid #e5e5e5;
    color: #e5e5e5;
    position: relative;
    font-size: .9em;
	  margin: 0px 0;
    }
.badge.badge-info {
    font-family: 'Open Sans',sans-serif;
    list-style: none;
    user-select: none;
    cursor: pointer;
    box-sizing: border-box;
    display: inline-block;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    color: #fff;
    background-color: #17a2b8;
    position: absolute;
    top: 2px;
    right: 5px;
    opacity: .8;
    font-size: 10px;
    padding: 3px 5px;
    border-radius: 50%;
    }    
.sr-only{
    font-family: 'Open Sans',sans-serif;
    list-style: none;
    font-weight: 400;
    text-align: center;
    user-select: none;
    line-height: 1.5;
    cursor: pointer;
    color: #e5e5e5;
    font-size: .9em;
    box-sizing: border-box;
    white-space: nowrap;
    border: 0;
    clip: rect(0,0,0,0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    }
.nav-item.ml-3.d-xl-none{
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    font-family: 'Open Sans',sans-serif;
    list-style: none;
    box-sizing: border-box;
    display: none!important;
    margin-left: 1rem!important;
    }
.btn.nav-link {
    list-style: none;
    box-sizing: border-box;
    margin: 0;
    font-family: inherit;
    text-transform: none;
    appearance: button;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: transparent;
    line-height: 1.5;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    display: block;
    overflow: hidden;
    cursor: pointer;
    padding: .5rem 1rem;
    border-radius: .25rem;
    border: 1px solid #e5e5e5;
    color: #e5e5e5;
    position: relative;
    font-size: .9em;
    }
</style>
</head>
<body>
<ul class="navbar-nav toolbar">
<li class="nav-item ml-3">
<a class="btn nav-link cart-btn" href="https://secure1.s4hosting.in/cart.php?a=view">
<script language="javascript" src="https://secure1.s4hosting.in/feeds/cartnumitems.php"></script>
<i class="fas fa-shopping-cart fa-fw" style="font-size:20px"></i>
<span class="badge badge-info">0</span>
<span class="sr-only">Shopping Cart</span>
</a>
</li>
<li class="nav-item ml-3 d-xl-none">
<button class="btn nav-link" type="button" data-toggle="collapse" data-target="#mainNavbar">
<span class="fas fa-bars fa-fw"></span>
</button>
</li>
</ul>
</body>
</html>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated