I would like to put an underline on the active icon link. I am able to underline but it is too close to the icon but I want to underline at the bottom-top of the navigation bar as shown in the image below.
* {
margin: 0;
padding: 0;
}
.header {
display: flex;
justify-content: space-between;
padding: 15px 20px;
position: sticky;
background-color: white;
z-index: 100;
top: 0;
box-shadow: 0px 5px 8px -9px rgba(0, 0, 0, 75);
}
.header__left>img {
height: 40px;
}
.header__center {
display: flex;
flex-direction: row;
justify-content: center;
}
.header__option {
display: flex;
align-items: center;
padding: 0 2vw;
cursor: pointer;
height: 52px;
}
.header__right {
display: flex;
}
.header__info {
display: flex;
align-items: center;
padding-right: 12px;
}
.header__info>span {
margin-left: 10px;
}
.header__option.active>i {
color: #1877f2;
border-bottom: 1px solid red;
border-bottom-width: 3px;
bottom: 0;
}
.header__option:hover {
background-color: #f0f2f5;
border-top-left-radius: 1px;
border-top-right-radius: 1px;
border-bottom-right-radius: 1px;
border-bottom-left-radius: 1px;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet" />
<div class="header">
<div class="header__left">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Free_logo.svg/600px-Free_logo.svg.png" />
</div>
<div class="header__center">
<div class="header__option active">
<i class="fas fa-home"></i>
</div>
<div class="header__option">
<i class="fas fa-users"></i>
</div>
<div class="header__option">
<i class="fas fa-video"></i>
</div>
</div>
<div class="header__right">
<div class="header__info">
<i class="fas fa-user-circle fa-lg"></i>
<span class="header__info__name">Aakash</span>
</div>
</div>
</div>
What is the way of underlining the icon with the exact width that is taken while hovering over the icons?
You need to apply the border on the parent element of the icon
* {
margin: 0;
padding: 0;
}
.header {
display: flex;
justify-content: space-between;
padding: 15px 20px 0px 20px; /* was padding: 15px 20px */
position: sticky;
background-color: white;
z-index: 100;
top: 0;
box-shadow: 0px 5px 8px -9px rgba(0, 0, 0, 75);
}
/* added below four lines for image centering */
.header__left {
display: flex;
align-items: center;
}
.header__left>img {
height: 40px;
}
.header__center {
display: flex;
flex-direction: row;
justify-content: center;
}
.header__option {
display: flex;
align-items: center;
padding: 0 2vw;
cursor: pointer;
height: 52px;
}
.header__right {
display: flex;
}
.header__info {
display: flex;
align-items: center;
padding-right: 12px;
}
.header__info>span {
margin-left: 10px;
}
/* added below four lines for bottom border on active link */
.header__option.active {
border-bottom: 1px solid red;
border-bottom-width: 3px;
}
.header__option.active>i {
color: #1877f2;
/* removed border-bottom, border-bottom-width and bottom rules */
}
.header__option:hover {
background-color: #f0f2f5;
border-top-left-radius: 1px;
border-top-right-radius: 1px;
border-bottom-right-radius: 1px;
border-bottom-left-radius: 1px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet" />
<div class="header">
<div class="header__left">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Free_logo.svg/600px-Free_logo.svg.png" />
</div>
<div class="header__center d-none d-xl-flex d-md-flex">
<div class="header__option active">
<i class="fas fa-home"></i>
</div>
<div class="header__option">
<i class="fas fa-users"></i>
</div>
<div class="header__option">
<i class="fas fa-video"></i>
</div>
</div>
<div class="header__right">
<div class="header__info d-none d-xl-flex">
<i class="fas fa-user-circle fa-lg"></i>
<span class="header__info__name">Aakash</span>
</div>
</div>
</div>
It's better to use pseudo elements (::after & ::before) for active states and for the underline.
.header__option{
position: relative;
}
.header__option.active::after{
content:'';
position: absolute;
bottom: -10px; (set it accordingly)
left: 0;
width: 100%;
height: 1px;
background: red;
}
* {
margin: 0;
padding: 0;
}
.header {
display: flex;
justify-content: space-between;
padding: 15px 20px 0;
position: sticky;
background-color: white;
z-index: 100;
top: 0;
box-shadow: 0px 5px 8px -9px rgba(0, 0, 0, 75);
}
.header__left>img {
height: 40px;
}
.header__center {
display: flex;
flex-direction: row;
justify-content: center;
}
.header__option {
display: flex;
align-items: center;
padding: 0 2vw;
cursor: pointer;
height: 52px;
}
.header__right {
display: flex;
}
.header__info {
display: flex;
align-items: center;
padding-right: 12px;
}
.header__info>span {
margin-left: 10px;
}
.header__option.active {
color: #1877f2;
border-bottom: 1px solid red;
border-bottom-width: 3px;
}
.header__option:hover {
background-color: #f0f2f5;
border-top-left-radius: 1px;
border-top-right-radius: 1px;
border-bottom-right-radius: 1px;
border-bottom-left-radius: 1px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet" />
<div class="header">
<div class="header__left">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Free_logo.svg/600px-Free_logo.svg.png" />
</div>
<div class="header__center d-none d-xl-flex d-md-flex">
<div class="header__option active">
<i class="fas fa-home"></i>
</div>
<div class="header__option">
<i class="fas fa-users"></i>
</div>
<div class="header__option">
<i class="fas fa-video"></i>
</div>
</div>
<div class="header__right">
<div class="header__info d-none d-xl-flex">
<i class="fas fa-user-circle fa-lg"></i>
<span class="header__info__name">Aakash</span>
</div>
</div>
</div>
Here is the working example:
* {
margin: 0;
padding: 0;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
position: sticky;
background-color: white;
z-index: 100;
top: 0;
box-shadow: 0px 5px 8px -9px rgba(0, 0, 0, 75);
padding-left: 15px;
padding-right: 15px;
}
.header__left>img {
height: 40px;
}
.header__left .header__option, .header__right .header__option, .header__center .header__option {
height: 60px;
min-width: 60px;
}
.header__center {
display: flex;
flex-direction: row;
justify-content: center;
}
.header__option {
display: flex;
align-items: center;
padding: 0 2vw;
cursor: pointer;
justify-content: center;
}
.header__right {
display: flex;
}
.header__info {
display: flex;
align-items: center;
padding-right: 12px;
}
.header__info>span {
margin-left: 10px;
}
.header__option.active, .header__option.active:hover {
color: #1877f2;
border-bottom: 1px solid red;
border-bottom-width: 3px;
}
.header__option:hover {
background-color: #f0f2f5;
border-bottom: 1px solid #dedede;
border-bottom-width: 3px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet" />
<div class="header">
<div class="header__left">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Free_logo.svg/600px-Free_logo.svg.png" />
</div>
<div class="header__center">
<div class="header__option active">
<i class="fas fa-home"></i>
</div>
<div class="header__option">
<i class="fas fa-users"></i>
</div>
<div class="header__option">
<i class="fas fa-video"></i>
</div>
</div>
<div class="header__right">
<div class="header__info d-none d-xl-flex">
<i class="fas fa-user-circle fa-lg"></i>
<span class="header__info__name">Aakash</span>
</div>
</div>
</div>
Related
I have been trying to adapt the solution from the question Active link border/underline asked by me.
I tried to adopt the same solution in the bootstrap navbar but there are some other effects with that solution.
Like I changed the padding of nav.navbar to 15px 20px 0px, the actual problem was solved whereas the hover and the alignment of the icon moved slightly down from the center.
nav.navbar {
align-items: center;
padding: 15px 20px 0px;
position: sticky;
background-color: white;
z-index: 100;
top: 0;
box-shadow: 0px 5px 8px -9px rgba(0, 0, 0, 75);
}
* {
margin: 0;
padding: 0;
}
nav.navbar {
padding: 15px 20px 0px;
position: sticky;
background-color: white;
z-index: 100;
top: 0;
box-shadow: 0px 5px 8px -9px rgba(0, 0, 0, 75);
}
.header__left>img {
height: 40px;
}
.header__items {
display: flex;
align-items: center;
justify-content: center;
margin-right: 8px;
cursor: pointer;
width: 40px;
height: 40px;
background-color: #e4e6eb;
border-radius: 50%;
transition: background-color 0.2s ease-in-out;
transition-timing-function: cubic-bezier(0, 0, 1, 1);
}
.header__center {
display: flex;
flex-direction: row;
justify-content: center;
}
.header__option {
display: flex;
align-items: center;
padding: 0 2vw;
cursor: pointer;
height: 52px;
}
.header__right {
display: flex;
}
.header__info {
display: flex;
align-items: center;
padding-right: 12px;
}
.header__info>span {
margin-left: 10px;
}
.header__option:hover {
background-color: #f0f2f5;
border-top-left-radius: 1px;
border-top-right-radius: 1px;
border-bottom-right-radius: 1px;
border-bottom-left-radius: 1px;
}
.header__option.active,
.header__option.active:hover {
color: #1877f2;
border-bottom: 1px solid #1877f2;
border-bottom-width: 3px;
background-color: #f8f9fa;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous" />
<nav class="navbar navbar-light bg-light">
<div class="header__left">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Free_logo.svg/600px-Free_logo.svg.png" />
</div>
<div class="header__center">
<div class="header__option active">
<i class="fas fa-home"></i>
</div>
<div class="header__option">
<i class="fas fa-users"></i>
</div>
<div class="header__option">
<i class="fas fa-video"></i>
</div>
</div>
<div class="header__right">
<div class="header__info">
<i class="fas fa-user-circle fa-lg"></i>
<span class="header__info__name">Aakash</span>
</div>
<div class="header__items">
<i class="fas fa-bell"></i>
</div>
<div class="header__items">
<i class="fas fa-bell"></i>
</div>
<div class="header__items">
<i class="fas fa-bell"></i>
</div>
</div>
</nav>
The effect I wanted to have while hovering the icon.
Updated questions to reflect what I also want:
You can add a "fake" bottom border same color as the background of navbar to the icons.
Like so -
* {
margin: 0;
padding: 0;
}
nav.navbar {
align-items: center;
padding: 0px 20px 0px; /* REMOVED TOP PADDING */
position: sticky;
background-color: white;
z-index: 100;
top: 0;
box-shadow: 0px 5px 8px -9px rgba(0, 0, 0, 75);
}
.header__left>img {
height: 40px;
}
.header__center {
display: flex;
flex-direction: row;
justify-content: center;
}
.header__option {
display: flex;
align-items: center;
padding: 0 2vw;
cursor: pointer;
height: 52px;
/* REMOVED BORDER */
/*border-bottom: 1px solid #f8f9fa;*/ /* the fake border */
/*border-bottom-width: 3px;*/ /* fake border width */
/* ADDED BOX SHADOW */
box-shadow: inset 0 -3px #f8f9fa;
}
.header__right {
display: flex;
}
.header__info {
display: flex;
align-items: center;
padding-right: 12px;
}
.header__info>span {
margin-left: 10px;
}
.header__option:hover {
background-color: #f0f2f5;
border-top-left-radius: 1px;
border-top-right-radius: 1px;
border-bottom-right-radius: 1px;
border-bottom-left-radius: 1px;
}
.header__option.active,
.header__option.active:hover {
color: #1877f2;
border-bottom: 1px solid #1877f2;
border-bottom-width: 3px;
background-color: #f8f9fa;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous" />
<nav class="navbar navbar-light bg-light">
<div class="header__left">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Free_logo.svg/600px-Free_logo.svg.png" />
</div>
<div class="header__center">
<div class="header__option active">
<i class="fas fa-home"></i>
</div>
<div class="header__option">
<i class="fas fa-users"></i>
</div>
<div class="header__option">
<i class="fas fa-video"></i>
</div>
</div>
<div class="header__right">
<div class="header__info">
<i class="fas fa-user-circle fa-lg"></i>
<span class="header__info__name">Aakash</span>
</div>
</div>
</nav>
Update: Changed border-bottom in header_options property to box-shadow.
2nd Update: removed top padding from nav.navbar to vertically center icons.
You could use inner box-shadow.
.header__option.active,
.header__option:hover {
color: #1877f2;
box-shadow: inset 0 -3px #1877f2;
/* border-bottom: 1px solid #1877f2; */
border-bottom-width: 3px;
background-color: #f8f9fa;
}
nav.navbar {
align-items: center;
padding: 15px 20px 0px;
position: sticky;
background-color: white;
z-index: 100;
top: 0;
box-shadow: 0px 5px 8px -9px rgba(0, 0, 0, 75);
}
* {
margin: 0;
padding: 0;
}
nav.navbar {
align-items: center;
padding: 15px 20px 0px;
position: sticky;
background-color: white;
z-index: 100;
top: 0;
box-shadow: 0px 5px 8px -9px rgba(0, 0, 0, 75);
}
.header__left>img {
height: 40px;
}
.header__items {
display: flex;
align-items: center;
justify-content: center;
margin-right: 8px;
cursor: pointer;
width: 40px;
height: 40px;
background-color: #e4e6eb;
border-radius: 50%;
transition: background-color 0.2s ease-in-out;
transition-timing-function: cubic-bezier(0, 0, 1, 1);
}
.header__center {
display: flex;
flex-direction: row;
justify-content: center;
}
.header__option {
display: flex;
align-items: center;
padding: 0 2vw;
cursor: pointer;
height: 52px;
}
.header__right {
display: flex;
}
.header__info {
display: flex;
align-items: center;
padding-right: 12px;
}
.header__info>span {
margin-left: 10px;
}
.header__option:hover {
background-color: #f0f2f5;
border-top-left-radius: 1px;
border-top-right-radius: 1px;
border-bottom-right-radius: 1px;
border-bottom-left-radius: 1px;
}
.header__option.active,
.header__option:hover {
color: #1877f2;
box-shadow: inset 0 -3px #1877f2;
/* border-bottom: 1px solid #1877f2; */
border-bottom-width: 3px;
background-color: #f8f9fa;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" integrity="sha512-1PKOgIY59xJ8Co8+NE6FZ+LOAZKjy+KY8iq0G4B3CyeY6wYHN3yt9PW0XpSriVlkMXe40PTKnXrLnZ9+fkDaog==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous" />
<nav class="navbar navbar-light bg-light">
<div class="header__left">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Free_logo.svg/600px-Free_logo.svg.png" />
</div>
<div class="header__center">
<div class="header__option active">
<i class="fas fa-home"></i>
</div>
<div class="header__option">
<i class="fas fa-users"></i>
</div>
<div class="header__option">
<i class="fas fa-video"></i>
</div>
</div>
<div class="header__right">
<div class="header__info">
<i class="fas fa-user-circle fa-lg"></i>
<span class="header__info__name">Aakash</span>
</div>
<div class="header__items">
<i class="fas fa-bell"></i>
</div>
</div>
</nav>
I have a snippet with HTML and CSS code (I use and bootstrap):
.main-section .get-tour {
height: 75px;
background: #fcf7f7;
background: -moz-linear-gradient(top, #fcf7f7 0%, #fcf7f7 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fcf7f7), color-stop(100%, #fcf7f7));
-webkit-background-origin: padding-box;
width: 100%;
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.15);
border-radius: 4px;
display: flex;
align-items: center;
padding-left: 15px;
margin-bottom: 35px;
}
.main-section .get-tour .form-block {
display: inline-block;
margin-right: 15px;
}
.main-section .get-tour .form-block label {
display: block;
font-size: 14px;
font-weight: 300;
margin-bottom: 10px;
}
.main-section .get-tour .form-block i {
font-size: 20px;
color: #a161e1;
margin-right: 5px;
}
.main-section .get-tour .form-block input {
background-color: rgba(113, 9, 245, 0.08);
border: none;
width: 150px;
height: 35px;
}
.main-section .get-tour .form-block button {
height: 75px;
background: #f2994a;
border-radius: 0px 4px 4px 0px;
color: #fff;
font-size: 21px;
border: none;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css">
<section class="main-section">
<div class="container">
<div class="get-tour">
<form action="">
<div class="form-block">
<label>Where</label>
<i class="fas fa-map-marker-alt"></i>
<input type="text">
</div>
<div class="form-block">
<label>Date</label>
<i class="far fa-calendar-alt"></i>
<input type="text">
</div>
<div class="form-block">
<label>Nights</label>
<i class="fas fa-clock"></i>
<input type="text">
</div>
<div class="form-block">
<label>Who</label>
<i class="fas fa-users"></i>
<input type="text">
</div>
<div class="form-block">
<label>Type transport</label>
<i class="fas fa-car"></i>
<input type="text">
</div>
<div class="form-block">
<button type="submit">Search</button>
</div>
</form>
</div>
</div>
</section>
When I set height: 75px; on my button, the whole form rises up, and button does not become in full height of block get-tour. How I can fix this issue? I work with flexbox, on class get-tour I have property align-items: center and all my elements in this block need be vertically center.
Use grid
Grid is good for this situation, kind of table.
See and tell me if it ok for you :)
In more big screen it look better
.main-section {
margin: 10px 0 0 0;
}
.main-section .get-tour {
/* height: 75px; */
background: #fcf7f7;
background: -moz-linear-gradient(top, #fcf7f7 0%, #fcf7f7 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fcf7f7), color-stop(100%, #fcf7f7));
-webkit-background-origin: padding-box;
width: 100%;
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.15);
border-radius: 4px;
display: flex;
align-items: center;
padding-left: 15px;
margin-bottom: 35px;
}
.form {
display: flex;
}
.main-section .get-tour .form-block label {
display: block;
font-size: 14px;
font-weight: 300;
grid-area: 1 / 2 / 1 / 2;
margin: 0;
overflow: hidden;
}
.main-section .get-tour .form-block i {
font-size: 20px;
color: #a161e1;
grid-area: 2 / 1 / 2 / 1;
display: flex;
align-items: center;
justify-content: center;
}
.main-section .get-tour .form-block input {
background-color: rgba(113, 9, 245, 0.08);
border: none;
width: 100%;
/* width: 150px; */
height: 35px;
grid-area: 2 / 2 / 2 / 2;
}
.main-section .get-tour .search button {
height: 75px;
background: #f2994a;
border-radius: 0px 4px 4px 0px;
color: #fff;
font-size: 21px;
border: none;
margin: 0 0 0 10px;
}
.form-block {
display: grid;
grid-template-columns: 35px 1fr;
grid-template-rows: 25px 35px;
margin: 2px 4px;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css">
<section class="main-section">
<div class="container">
<div class="get-tour">
<form class="form" action="">
<div class="form-block">
<label>Where</label>
<i class="fas fa-map-marker-alt"></i>
<input type="text">
</div>
<div class="form-block">
<label>Date</label>
<i class="far fa-calendar-alt"></i>
<input type="text">
</div>
<div class="form-block">
<label>Nights</label>
<i class="fas fa-clock"></i>
<input type="text">
</div>
<div class="form-block">
<label>Who</label>
<i class="fas fa-users"></i>
<input type="text">
</div>
<div class="form-block">
<label>Type transport</label>
<i class="fas fa-car"></i>
<input type="text">
</div>
<div class="search">
<button type="submit">Search</button>
</div>
</form>
</div>
</div>
</section>
Add display:flex, justify-content: space-between; and width: inherit; to form
form{
display:flex;
justify-content: space-between;
width: inherit;
}
Remove display:inline-block and margin-right:15px; from .main-section .get-tour
.form-block class.
.main-section .get-tour .form-block {
display: inline-block; /*remove this */
margin-right: 15px; /*remove this */
}
Optional:
If u want u can set the button height as 100%;
.main-section .get-tour .form-block button {
height: 75px; /* If u want u can set the button height as 100%*/
background: #f2994a;
border-radius: 0px 4px 4px 0px;
color: #fff;
font-size: 21px;
border: none;
}
Demo:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css">
<style>
form {
display: flex;
justify-content: space-between;
width: inherit;
}
.main-section .get-tour {
height: 75px;
background: #fcf7f7;
background: -moz-linear-gradient(top, #fcf7f7 0%, #fcf7f7 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fcf7f7), color-stop(100%, #fcf7f7));
-webkit-background-origin: padding-box;
width: 100%;
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.15);
border-radius: 4px;
display: flex;
align-items: center;
padding-left: 15px;
margin-bottom: 35px;
}
.main-section .get-tour .form-block label {
display: block;
font-size: 14px;
font-weight: 300;
margin-bottom: 10px;
margin-left:25px;
}
.main-section .get-tour .form-block i {
font-size: 20px;
color: #a161e1;
margin-right: 5px;
}
.main-section .get-tour .form-block input {
background-color: rgba(113, 9, 245, 0.08);
border: none;
width: 150px;
height: 35px;
}
.main-section .get-tour .form-block button {
height: 75px;
background: #f2994a;
border-radius: 0px 4px 4px 0px;
color: #fff;
font-size: 21px;
border: none;
}
</style>
</head>
<body>
<section class="main-section">
<div class="container">
<div class="get-tour">
<form action="">
<div class="form-block">
<label>Where</label>
<i class="fas fa-map-marker-alt"></i>
<input type="text">
</div>
<div class="form-block">
<label> Date</label>
<i class="far fa-calendar-alt"></i>
<input type="text">
</div>
<div class="form-block">
<label> Nights</label>
<i class="fas fa-clock"></i>
<input type="text">
</div>
<div class="form-block">
<label> Who</label>
<i class="fas fa-users"></i>
<input type="text">
</div>
<div class="form-block">
<label> Type transport</label>
<i class="fas fa-car"></i>
<input type="text">
</div>
<div class="form-block">
<button type="submit">Search</button>
</div>
</form>
</div>
</div>
</section>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css">
<style>
form {
display: flex;
justify-content: space-between;
width: inherit;
}
.main-section .get-tour {
height: 75px;
background: #fcf7f7;
background: -moz-linear-gradient(top, #fcf7f7 0%, #fcf7f7 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fcf7f7), color-stop(100%, #fcf7f7));
-webkit-background-origin: padding-box;
width: 100%;
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.15);
border-radius: 4px;
display: flex;
align-items: center;
padding-left: 15px;
margin-bottom: 35px;
}
.main-section .get-tour .form-block label {
display: block;
font-size: 14px;
font-weight: 300;
margin-bottom: 10px;
}
.one {
margin-left: 25px;
}
.two {
margin-left: 27px;
}
.three {
margin-left: 26px;
}
.four {
margin-left: 28px;
}
.five {
margin-left: 26px;
}
.main-section .get-tour .form-block i {
font-size: 20px;
color: #a161e1;
margin-right: 5px;
}
.main-section .get-tour .form-block input {
background-color: rgba(113, 9, 245, 0.08);
border: none;
width: 150px;
height: 35px;
}
.main-section .get-tour .form-block button {
height: 75px;
background: #f2994a;
border-radius: 0px 4px 4px 0px;
color: #fff;
font-size: 21px;
border: none;
}
</style>
</head>
<body>
<section class="main-section">
<div class="container">
<div class="get-tour">
<form action="">
<div class="form-block">
<label class="one">Where</label>
<i class="fas fa-map-marker-alt"></i>
<input type="text">
</div>
<div class="form-block">
<label class="two">Date</label>
<i class="far fa-calendar-alt"></i>
<input type="text">
</div>
<div class="form-block">
<label class="three"> Nights</label>
<i class="fas fa-clock"></i>
<input type="text">
</div>
<div class="form-block">
<label class="four"> Who</label>
<i class="fas fa-users"></i>
<input type="text">
</div>
<div class="form-block">
<label class="five"> Type transport</label>
<i class="fas fa-car"></i>
<input type="text">
</div>
<div class="form-block">
<button type="submit">Search</button>
</div>
</form>
</div>
</div>
</section>
</body>
</html>
Sharing here the demo UI. In this UI, I would want to show the CALENDAR outside the parent window just by using CSS. The Calendar should overflow over the Submit/cancel button div n outside that too]1
Code snippet:
Here, the class date-picker-wrp should come outside the complete MODAL box.
.modalwindow {
z-index: auto;
position: fixed;
box-shadow: 0 0 20px #333;
background-color: #fff;
border-radius: 0;
overflow: inherit;
transform: translate(-50%,-50%);
left: 50%;
top: 50%;
}
.zc-form > div {
max-height: 80vh;
display: flex;
flex-direction: column;
height: 100%;
width: 550px;
position: relative;
border-radius: 5px;
overflow: hidden;
}
.zc-form-body {
max-height: 500px;
overflow: auto;
padding: 10px 30px 30px;
}
.posrel {
position: relative;
}
.zc-form-input{
border-radius: 4px;
line-height: 33px;
padding: 0 18px 0 15px;
font-size: 14px;
color: #2d3138;
position: relative;
height: 35px;
border: solid 0.5px #dedede;
background-color: #fff;
}
.date-picker-wrp{
position: absolute;
border-radius: 4px;
overflow: hidden;
background-color: #fff;
z-index: 1000;
box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 10px 0px;
width: 100%;
margin-top: 2px;
}
.datepicker{
text-align: left;
padding: 10px 7px;
}
.zc-form-footer{
height: 85px;
background-color: #fff;
display: flex;
align-items: center;
padding: 0 30px;
justify-content: space-between;
flex-shrink: 0;
box-shadow: 0px 0px 5px 0 rgba(0, 0, 0, 0.21);
z-index: 1;
}
<div id="form_dialog" type="popup" class="modalwindow zc-form zcalgncntr zcbg_mask">
<div>
<div id="winhead" class="mheader ">Create Modal</div>
<section class="zc-form-body">
<div inputs="">
<div class="font14 mrgT20 posrel">
<div class="zc-form-input-hdr">
<span>date</span>
<span class="clr9 zc-form-hint">Enter the due date</span>
</div>
<div class="posrel cur">
<input placeholder="Ex : 2018/10/11" class="zc-form-input zc-form-date-prvw textL cur">
<span class="zc-form-icons">
<div loading="" class="form-input-loader dN">
<span></span>
<span></span>
<span></span>
</div>
<span class="msi-calndr zcclr font15"></span>
<span class="msi-close zcclr"></span>
</span>
<div class="date-picker-wrp" style="display: block;">
<div element="calendar" class="date-picker">
<div class="datepicker" style="display: block;">
<div class="datepickerContainer" style="width: 0px; height: 0px;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="zc-form-footer">
<div class="w100 h100 dflx fjustifySB">
<div class="flexC">
<button class="buttn_pos">Add Task</button>
<button class="buttn_neg btn evbtn mrgR20">Cancel</button> </div>
</div>
</footer>
</div>
</div>
Expected result:
I want the calendar dom to appear like the dropdown in below shortcut, but ONLY BY USING PURE CSS ( no javascript calculation)
Please refer this JS Fiddle link: https://jsfiddle.net/dilip96025/gzh26fej/28/
Here, the Country dropdown should come outside the box with con class.
As far as I could reproduce your problem with your current included code, you need to remove overflow: hidden from .zc-form > div and remove overflow: auto from .zc-form-body. The cause of your problem was that overflow: hidden really hides everything that goes beyond its own height and width.
.modalwindow {
z-index: auto;
position: fixed;
box-shadow: 0 0 20px #333;
background-color: #fff;
border-radius: 0;
overflow: inherit;
transform: translate(-50%, -50%);
left: 50%;
top: 50%;
}
.zc-form > div {
max-height: 80vh;
display: flex;
flex-direction: column;
height: 100%;
width: 550px;
position: relative;
border-radius: 5px;
}
.zc-form-body {
max-height: 500px;
padding: 10px 30px 30px;
}
.posrel {
position: relative;
}
.zc-form-input {
border-radius: 4px;
line-height: 33px;
padding: 0 18px 0 15px;
font-size: 14px;
color: #2d3138;
position: relative;
height: 35px;
border: solid 0.5px #dedede;
background-color: #fff;
}
.date-picker-wrp {
position: absolute;
border-radius: 4px;
overflow: hidden;
background-color: #fff;
z-index: 1000;
box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 10px 0px;
width: 100%;
margin-top: 2px;
}
.datepicker {
text-align: left;
padding: 10px 7px;
}
.zc-form-footer {
height: 85px;
background-color: #fff;
display: flex;
align-items: center;
padding: 0 30px;
justify-content: space-between;
flex-shrink: 0;
box-shadow: 0px 0px 5px 0 rgba(0, 0, 0, 0.21);
z-index: 1;
}
<div id="form_dialog" type="popup" class="modalwindow zc-form zcalgncntr zcbg_mask">
<div>
<div id="winhead" class="mheader ">Create Modal</div>
<section class="zc-form-body">
<div inputs="">
<div class="font14 mrgT20 posrel">
<div class="zc-form-input-hdr">
<span>date</span>
<span class="clr9 zc-form-hint">Enter the due date</span>
</div>
<div class="posrel cur">
<input placeholder="Ex : 2018/10/11" class="zc-form-input zc-form-date-prvw textL cur">
<span class="zc-form-icons">
<div loading="" class="form-input-loader dN">
<span></span>
<span></span>
<span></span>
</div>
<span class="msi-calndr zcclr font15"></span>
<span class="msi-close zcclr"></span>
</span>
<div class="date-picker-wrp" style="display: block;">
test1<br>
test2<br>
test3<br>
test4<br>
test5<br>
test6<br>
<div element="calendar" class="date-picker">
<div class="datepicker" style="display: block;">
<div class="datepickerContainer" style="width: 0px; height: 0px;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="zc-form-footer">
<div class="w100 h100 dflx fjustifySB">
<div class="flexC">
<button class="buttn_pos">Add Task</button>
<button class="buttn_neg btn evbtn mrgR20">Cancel</button> </div>
</div>
</footer>
</div>
</div>
Edit: second code snippet in answer to comment.
.modalwindow {
z-index: auto;
position: fixed;
box-shadow: 0 0 20px #333;
background-color: #fff;
border-radius: 0;
overflow: inherit;
transform: translate(-50%, -50%);
left: 50%;
top: 50%;
}
.zc-form > div {
max-height: 80vh;
display: flex;
flex-direction: column;
height: 100%;
width: 550px;
position: relative;
border-radius: 5px;
}
.zc-form-body {
max-height: 500px;
overflow: auto;
padding: 10px 30px 30px;
}
.posrel {
position: relative;
}
.zc-form-input {
border-radius: 4px;
line-height: 33px;
padding: 0 18px 0 15px;
font-size: 14px;
color: #2d3138;
position: relative;
height: 35px;
border: solid 0.5px #dedede;
background-color: #fff;
}
.date-picker-wrp {
position: absolute;
border-radius: 4px;
overflow: hidden;
background-color: #fff;
z-index: 1000;
box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 10px 0px;
width: 100%;
margin-top: 2px;
}
.datepicker {
text-align: left;
padding: 10px 7px;
}
.zc-form-footer {
height: 85px;
background-color: #fff;
display: flex;
align-items: center;
padding: 0 30px;
justify-content: space-between;
flex-shrink: 0;
box-shadow: 0px 0px 5px 0 rgba(0, 0, 0, 0.21);
z-index: 1;
}
<div id="form_dialog" type="popup" class="modalwindow zc-form zcalgncntr zcbg_mask">
<div>
<div id="winhead" class="mheader ">Create Modal</div>
<section class="zc-form-body">
<div inputs="">
<div class="font14 mrgT20 posrel">
<div class="zc-form-input-hdr">
<span>date</span>
<span class="clr9 zc-form-hint">Enter the due date</span>
</div>
<div class="posrel cur">
<input placeholder="Ex : 2018/10/11" class="zc-form-input zc-form-date-prvw textL cur">
<span class="zc-form-icons">
<div loading="" class="form-input-loader dN">
<span></span>
<span></span>
<span></span>
</div>
<span class="msi-calndr zcclr font15"></span>
<span class="msi-close zcclr"></span>
</span>
<div class="date-picker-wrp" style="display: block;">
test1<br>
test2<br>
test3<br>
test4<br>
test5<br>
test6<br>
<div element="calendar" class="date-picker">
<div class="datepicker" style="display: block;">
<div class="datepickerContainer" style="width: 0px; height: 0px;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="zc-form-footer">
<div class="w100 h100 dflx fjustifySB">
<div class="flexC">
<button class="buttn_pos">Add Task</button>
<button class="buttn_neg btn evbtn mrgR20">Cancel</button> </div>
</div>
</footer>
</div>
</div>
In the calendar's css add "z-index:1000"
Eg:
<div class="calendar" style="z-index:1000"></div>
I am trying to get a div height take the remaining space between two divs.
<div id='company_col' class='contact_columns'>
<div id='company_title' class ='col_title'>
<h3>Company</h3>
</div>
<hr>
<div id='company_list' class='contact_lists'>
</div>
<div id='company_edit_bar' class='edit_bar'>
<div id='company_add_btn' class='edit_btn'>
<i class='fa fa-plus' aria-hidden='true'></i>
</div>
<div id='company_delete_btn' class='edit_btn'>
<i class='fa fa-minus' aria-hidden='true'></i>
</div>
</div>
Here is the JS Fiddle: https://jsfiddle.net/xqLpqsdk/
I need to make .contact_lists to fill the space between .col_title and .edit_bar so the scroll bar is only displayed between those 2 divs
I've tried making .contact_lists position absolute but that didn't work.
If I am not wrong this will solve your issue. Please take a look at this,
#contact_editor_wrapper {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .5);
z-index: 10000;
}
#contact_editor {
display: block;
position: absolute;
width: 100%;
max-width: 1400px;
height: 100%;
min-height: 400px;
max-height: 800px;
background-color: #99AFC5;
border: solid 1px black;
border-radius: 10px;
margin: 0 auto;
padding: 2.5px 5px;
}
#x_contact_editor {
display: inline-block;
position: absolute;
right: 5px;
cursor: pointer;
}
.contact_editor_row {
margin: .5% 0;
}
#contact_editor_title_wrapper {
display: block;
width: 100%;
height: 4%;
}
#contact_editor_title {
padding: 6px 0;
text-align: center;
font-size: 20px;
text-shadow: 0 1px 1px rgba(0,0,0,.2);
}
#contact_columns {
display: flex;
height: 89%;
width: 100%;
flex-direction: row;
justify-content: center;
}
.contact_columns {
display: flex;
flex-flow: column;
height: 100%;
background-color: white;
margin: 0 .25%;
border: 1px solid black;
border-radius: 5px;
overflow: hidden;
}
#type_col {
width: 14.5%;
}
#company_col {
width: 42%;
}
#contact_col {
width: 42%
}
#contact_editor_btns {
display: block;
width: 100%;
height: 4%;
}
.col_title {
display: block;
text-align: center;
width: 100%;
height: auto;
margin-top: 9px;
text-shadow: 0 1px 1px rgba(0,0,0,.2);
border-bottom: 1px solid black;
}
.contact_lists {
position: relative;
height: 100%;
overflow-y: scroll;
}
.edit_bar {
display: block;
//position: absolute;
bottom: 0;
width: 100%;
height: auto;
border-top: 1px solid black;
border-radius: 0 0 5px 5px;
background-color: #00162C;
}
.edit_btn {
color: white;
display: inline-block;
height: 100%;
margin: 0;
padding: 0;
border-right: 1px solid black;
transition: all .5s ease;
}
.edit_btn:hover {
background-color: #99AFC5;
transition: all .5s ease;
}
.edit_btn i {
margin: 4px 8px;
}
#company_delete_btn, #contact_delete_btn {
margin-left: -2.5px;
}
<div id='contact_editor_wrapper' class='hide_contact_editor'>
<div id='contact_editor'>
<div id='x_contact_editor'>
<i class='fa fa-times' aria-hidden='true'></i>
</div>
<div id='contact_editor_title_wrapper' class='contact_editor_row'>
<div id='contact_editor_title'>Contact Editor</div>
</div>
<div id='contact_columns' class='contact_editor_row'>
<div id='type_col' class='contact_columns'>
<div id='type_title' class ='col_title'>
<h3>Type</h3>
</div>
<hr>
<div id='type_list' class='contact_lists'>
</div>
</div>
<div id='company_col' class='contact_columns'>
<div id='company_title' class ='col_title'>
<h3>Company</h3>
</div>
<hr>
<div id='company_list' class='contact_lists'>
</div>
<div id='company_edit_bar' class='edit_bar'>
<div id='company_add_btn' class='edit_btn'>
<i class='fa fa-plus' aria-hidden='true'></i>
</div>
<div id='company_delete_btn' class='edit_btn'>
<i class='fa fa-minus' aria-hidden='true'></i>
</div>
</div>
</div>
<div id='contact_col' class='contact_columns'>
<div id='contact_title' class ='col_title'>
<h3>Contact</h3>
</div>
<hr>
<div id='contact_list' class='contact_lists'>
</div>
<div id='contact_edit_bar' class='edit_bar'>
<div id='contact_add_btn' class='edit_btn'>
<i class='fa fa-plus' aria-hidden='true'></i>
</div>
<div id='contact_delete_btn' class='edit_btn'>
<i class='fa fa-minus' aria-hidden='true'></i>
</div>
</div>
</div>
</div>
<div id='contact_editor_btns' class='contact_editor_row'>
</div>
</div>
</div>
I have a product grid with Bootstrap and I added flexbox styles for the products .item box have same height.
You can check the grid here:
https://jsfiddle.net/oet3c3dp/2/
I add the basic flexbox styles, for the parent element .product-list:
.product-list {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
-webkit-justify-content: space-between;
justify-content: space-between;
}
And then I added the styles for the child's elements:
.product-list .item {
padding: 0 10px 10px 0px;
margin-left: 0;
float: left;
text-align: center;
-webkit-flex: 0 0 auto;
flex: 0 0 auto;
}
Why this not works fine?
You are missing classes .container and .row (which they are part of the bootstrap grid), plus you need to change your flex: 0 0 auto to flex:1
.product-list {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
flex-flow: row wrap;
-webkit-justify-content: space-between;
justify-content: space-between;
}
.product-list .item {
padding: 0 10px 10px 0px;
margin-left: 0;
float: left;
text-align: center;
-webkit-flex: 1;
flex: 1;
}
.product-list .color-swatch {
width: 16px;
height: 16px;
border: 1px solid;
border-color: #d8d9db;
display: inline-block;
vertical-align: middle;
-webkit-border-top-right-radius: 50%;
border-top-right-radius: 50%;
-webkit-border-bottom-right-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
border-bottom-left-radius: 0;
-webkit-border-top-left-radius: 0;
border-top-left-radius: 0;
-webkit-border-radius: 50%;
border-radius: 50%;
background-clip: padding-box;
-webkit-box-shadow: 0 3px 8px -5px black inset, -3px -1px 8px -4px white inset;
box-shadow: 0 3px 8px -5px black inset, -3px -1px 8px -4px white inset;
}
.product-list h3 {
font-size: 14px;
margin: 0px;
text-transform: uppercase;
margin-top: 2px;
}
.item-inner {
position: relative;
padding: 0 18px;
border: 1px solid #e0e0e0;
background-color: #fff;
/*min-height: 300px*/
}
.product-img {
padding-top: 10px;
text-align: center;
/* min-width: 210px;
height: 220px;*/
overflow: hidden;
/*width: 170px;*/
}
.product-info {
position: relative;
/*height: 73px;*/
padding-top: 20px;
}
.product-info span.extra-info {
display: block;
color: #455A64;
font-size: 12px;
}
.product-img img {
display: inline-block;
vertical-align: middle;
/* max-width: 210px;
max-height: 210px;*/
}
.product-list .item .price {
color: #37474F;
font-weight: 700;
font-size: 18px;
margin-right: 10px;
}
.product-list .item .product-id {
color: #455A64;
}
.product-list .item-inner:hover {
box-shadow: 0 3px 6px 0 rgba(51, 51, 51, .2);
}
.product-list .item a:hover {
color: #651fff;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="product-list row">
<div class="item col-xs-6 col-sm-3">
<div class="item-inner">
<a href="">
<div class="product-img">
<img class="img-responsive" src="http://rp-static.com/common/images/products_new/1728/1_m.jpg?dts={DPL_TS}" alt="">
</div>
<div class="product-info">
<div class="block">
<span class="price">9,95 €</span>
<span class="product-id">#1728</span>
</div>
<h3>TAZA CERAMICA</h3>
</div>
</a>
</div>
</div>
<div class="item col-xs-6 col-sm-3">
<div class="item-inner">
<a href="">
<div class="product-img">
<img class="img-responsive" src="http://rp-static.com/common/images/products_new/2100/1_m.jpg?dts={DPL_TS}" alt="">
</div>
<div class="product-info">
<div class="block">
<span class="price">16 €</span>
<span class="product-id">#2100</span>
</div>
<h3>MATRICULA MINI</h3>
</div>
</a>
</div>
</div>
<div class="item col-xs-6 col-sm-3">
<div class="item-inner">
<a href="">
<div class="product-img">
<img class="img-responsive" src="http://rp-static.com/common/images/products_new/2638/1_m.jpg?dts={DPL_TS}" alt="">
</div>
<div class="product-info">
<div class="block">
<span class="price">29 €</span>
<span class="product-id">#2638</span>
</div>
<h3>RELOJ PULSERA ZAC</h3>
</div>
</a>
</div>
</div>
<div class="item col-xs-6 col-sm-3">
<div class="item-inner">
<a href="">
<div class="product-img">
<img class="img-responsive" src="http://rp-static.com/common/images/products_new/5407/1_m.jpg?dts={DPL_TS}" alt="">
</div>
<div class="product-info">
<div class="block">
<span class="price">39 €</span>
<span class="product-id">#5407</span>
</div>
<h3>BOLSO VAQUERO PEQUEÑO</h3>
</div>
</a>
</div>
</div>
</div>
</div>