css overflow visible only for y - html

I am trying to overflow my tooltip over the slider section (y axis).
Under the slider I have another slider with 9 elements (every one have a tooltip)
I want the slider below to be width 1170px with 5 elements. The remaining items should be hidden.
My English is poor so I mad short video 24s https://vimeo.com/216830963
And here is the code
section#slider {
width: 100%;
overflow: hidden;
padding-top: 110px;
padding-bottom: 0px;
height: 482px;
}
.wrap {
position: relative;
margin: 3em 0;
}
/* Frame */
.frame {
height: 130px;
line-height: 130px;
overflow-x: hidden;
/*overflow: hidden !important;*/
}
.frame ul {
list-style: none;
margin: 0;
padding: 0;
height: 100%;
font-size: 50px;
}
.frame ul li {
float: left;
width: 227px;
height: 100%;
margin: 0 2px 0 0;
padding: 0;
background: #f1f1f1;
color: #00b5f6;
text-align: center;
cursor: pointer;
/*border-right: 1px solid #00b5f6;*/
}
.frame ul li:hover {
color: #fff;
background: #00b5f6;
}
/* Scrollbar */
.scrollbar {
margin: 0 0 1em 0;
height: 2px;
background: #ccc;
line-height: 0;
}
.scrollbar .handle {
width: 100px;
height: 100%;
background: #292a33;
cursor: pointer;
}
.scrollbar .handle .mousearea {
position: absolute;
top: -9px;
left: 0;
width: 100%;
height: 20px;
}
/* setup tooltips */
.tooltip {
position: relative;
overflow: visible;
}
.tooltip:before,
.tooltip:after {
position: absolute;
display: inline-block;
opacity: 0;
pointer-events: none;
width: 225px;
overflow: visible;
}
.tooltip:after {
border-right: 6px solid transparent;
border-top: 6px solid #00b5f6;
border-left: 6px solid transparent;
content: '';
height: 0;
top: -5px;
left: 20px;
width: 0;
}
.tooltip:before {
background: #00b5f6;
border-radius: 2px;
color: #fff;
content: attr(data-title);
font-size: 14px;
padding: 6px 10px;
top: -145px;
left: 0px;
white-space: nowrap;
height: 130px;
max-width: 207px !important;
}
/* the animations */
/* expand */
.tooltip.expand:before {
transform: scale3d(.2, .2, 1);
transition: all .2s ease-in-out 0.5s;
}
.tooltip.expand:after {
transform: translate3d(0, 6px, 0);
transition: all .2s ease-in-out 0.5s;
}
.tooltip.expand:hover:before,
.tooltip.expand:hover:after {
opacity: 1;
transform: scale3d(1, 1, 1);
}
<section id="slider">
<img src="http://localhost/wh1/wp-content/uploads/2016/02/si.png">
</section>
<div style="width:1170px; height:180px; margin-left:auto; margin-right:auto;">
<div style="max-width: 100%;">
<div class="wrap" style="margin:15px 0 15px 0; ">
<div class="scrollbar">
<div class="handle">
<div class="mousearea"></div>
</div>
</div>
<div class="frame" id="basic">
<ul class="clearfix">
<li class="tooltip expand" data-title="Text tooltip">1</li>
<li class="tooltip expand" data-title="Text tooltip">2</li>
<li class="tooltip expand" data-title="Text tooltip">3</li>
<li class="tooltip expand" data-title="Text tooltip">4</li>
<li class="tooltip expand" data-title="Text tooltip">5</li>
<li class="tooltip expand" data-title="Text tooltip">6</li>
<li class="tooltip expand" data-title="Text tooltip">7</li>
<li class="tooltip expand" data-title="Text tooltip">8</li>
<li class="tooltip expand" data-title="Text tooltip">9</li>
</ul>
</div>
</div>
</div>
</div>
I don't know how to fix it. Please help if You can
Thanks

Because you want to have that tool tip showing on the top of the scroll frame, you need to include a new wrapper from that image slider on the top. I mean like this:
And the wrapper must be overflow-x: hidden;
With this approach you can make the tool tip visible and that overflow from the scrolling area hidden

Give #basic or .frame a specific width and then apply css Overflow property

Related

Fully responsive progress bar

I have to create a progress bar that has to be fully responsive. In order to be responsive I don't want the progress bar class to have a fixed width, but when I put auto in width, line of progress bar is detached from the star also if I give to them auto width
Fixed width: look good
Width auto
First how can I fix this issue, and perhaps someone can help me achieve this progress bar to be responsive on mobile also so that the line of progress bar will be vertical.
.progress-bar {
width: 750px;
display: flex;
margin: 40px 0;
}
.progress-bar .step {
text-align: center;
width: 100%;
}
.progress-bar .step .bullet {
position: relative;
height: 25px;
width: 25px;
display: inline-block;
}
.progress-bar .step:last-child .bullet:before,
.progress-bar .step:last-child .bullet::after {
display: none;
}
.progress-bar .step .bullet:before,
.progress-bar .step .bullet::after {
position: absolute;
content: "";
height: 3px;
right: -136px;
bottom: 11px;
width: 142px;
background: #C1C1C1;
}
.active-bullet {
z-index: 1;
}
.active-check {
z-index: 2;
}
<div class="progress-bar">
<div class="step">
<div class="bullet active-bullet">
<img src="star-pb-active.svg">
</div>
<div class="check active-check" style="
border-bottom: 2px solid black;
padding: 2px;
DISPLAY: table-cell;
LEFT: 40px;
POSITION: relative;
">Order placed</div>
</div>
<div class="step">
<div class="bullet">
<img src="star-pb.svg">
</div>
<div class="check">Jewerly Creation</div>
</div>
<div class="step">
<div class="bullet">
<img src="star-pb.svg">
</div>
<div class="check">Packing & Quality Control</div>
</div>
<div class="step">
<div class="bullet">
<img src="star-pb.svg">
</div>
<div class="check">Shipped</div>
</div>
<div class="step">
<div class="bullet">
<img src="star-pb.svg">
</div>
<div class="check">Estimated Delivery</div>
</div>
</div>
You should try taking a look at the flex-grow property from Flexbox.
By giving display: flex to the parent, and flex-grow: 1 to the children, you should be able to make every step be the same size and take all the width of their container.
It works the way you want, in fixed or auto width.
.progress-bar {
width: auto;
display: flex;
margin: 40px 0;
}
.progress-bar .step {
text-align: center;
position: relative;
isolation: isolate;
width: 100%;
}
.progress-bar .step::after {
content: "";
position: absolute;
z-index: -1;
height: 3px;
top: 12px; /* 1/2 of .bullet's height */
width: 100%;
background: #C1C1C1;
}
.progress-bar .step:last-child::after {
display: none;
}
.progress-bar .step .bullet {
position: relative;
height: 25px;
width: 25px;
display: inline-block;
}
.active-bullet {
z-index: 1;
}
.active-check {
z-index: 2;
}
Added pseudo element on the parent of .bullet.
Also you don't need ::before, one of those pseudo elements was enough.
try below code, your code some confusion.
use flex in css
below sample add one button which goes your activity to next step
it is fully responsive - on desktop this code horizontal and on mobile this code show vertical progressbar.
just use small js, css and for tick icon font awesome js.
if any query comment it.
let step = 'step1';
const step1 = document.getElementById('step1');
const step2 = document.getElementById('step2');
const step3 = document.getElementById('step3');
const step4 = document.getElementById('step4');
function next() {
if (step === 'step1') {
step = 'step2';
step1.classList.remove("is-active");
step1.classList.add("is-complete");
step2.classList.add("is-active");
} else if (step === 'step2') {
step = 'step3';
step2.classList.remove("is-active");
step2.classList.add("is-complete");
step3.classList.add("is-active");
} else if (step === 'step3') {
step = 'step4d';
step3.classList.remove("is-active");
step3.classList.add("is-complete");
step4.classList.add("is-active");
} else if (step === 'step4d') {
step = 'complete';
step4.classList.remove("is-active");
step4.classList.add("is-complete");
} else if (step === 'complete') {
step = 'step1';
step4.classList.remove("is-complete");
step3.classList.remove("is-complete");
step2.classList.remove("is-complete");
step1.classList.remove("is-complete");
step1.classList.add("is-active");
}
}
.progress-bar {
position: relative;
display: flex;
}
.progress-bar .progress-track {
position: absolute;
top: 5px;
width: 100%;
height: 5px;
background-color: #dfe3e4;
z-index: -1;
}
.progress-bar .progress-step {
position: relative;
width: 100%;
font-size: 12px;
text-align: center;
}
.progress-bar .progress-step:last-child:after {
display: none;
}
.progress-bar .progress-step:before {
content: "\f00c";
display: flex;
margin: 0 auto;
margin-bottom: 10px;
width: 10px;
height: 10px;
background: #fff;
border: 4px solid #dfe3e4;
border-radius: 100%;
color: transparent;
}
.progress-bar .progress-step:after {
content: "";
position: absolute;
top: 6px;
left: 50%;
width: 0%;
transition: width 1s ease-in;
height: 5px;
background: #dfe3e4;
z-index: -1;
}
#media screen and (max-width:700px) {
.progress-bar {
position: relative;
display: inline-block;
}
.progress-bar .progress-track {
position: absolute;
top: -10px;
width: 100%;
height: 5px;
background-color: #dfe3e4;
z-index: -1;
transform: rotate(90deg);
}
.progress-bar .progress-step {
position: relative;
width: 100%;
font-size: 12px;
text-align: center;
}
.progress-bar .progress-step:last-child:after {
display: none;
}
.progrestext
{
left: 44px;
position: absolute;
top: 0px;
}
.progress-bar .progress-step:after {
content: "";
position: absolute;
top: 20px;
left: 0%;
width: 0%;
transition: width 1s ease-in;
height: 5px;
background: #dfe3e4;
z-index: -1;
transform: rotate(90deg);
}
}
.progress-bar .progress-step.is-active {
color: #2183dd;
}
.progress-bar .progress-step.is-active:before {
border: 4px solid #777;
animation: pulse 2s infinite;
}
.progress-bar .progress-step.is-complete {
color: #009900;
}
.progress-bar .progress-step.is-complete:before {
font-family: FontAwesome;
font-size: 10px;
color: #fff;
background: #009900;
border: 4px solid transparent;
}
.progress-bar .progress-step.is-complete:after {
background: #2183dd;
animation: nextStep 1s;
animation-fill-mode: forwards;
}
#keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(33, 131, 221, 0.8);
}
70% {
box-shadow: 0 0 0 10px rgba(33, 131, 221, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(33, 131, 221, 0);
}
}
#keyframes nextStep {
0% {
width: 0%;
}
100% {
width: 100%;
}
}
.container {
margin: 50px 100px;
}
button {
position: absolute;
right: 50px;
bottom: 20px;
cursor: pointer;
}
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://use.fontawesome.com/c47bc38e87.js"></script>
<div class="container">
<div class="progress-bar">
<div class="progress-track"></div>
<div id="step1" class="progress-step">
<div class="progrestext">placed</div>
</div>
<div id="step2" class="progress-step">
<div class="progrestext">Creation</div>
</div>
<div id="step3" class="progress-step">
<div class="progrestext">Packing</div>
</div>
<div id="step4" class="progress-step">
<div class="progrestext">Delivered</div>
</div>
</div>
<button onClick=next()>Next Step</button>
</div>

Top border radius in linear gradient background

I am making testimonial feature in a carousel
This is the sample pic of what I wanted to achieve
And this is what I've achieved so far
https://jsfiddle.net/2we347xu/
but this time I wanted to make the top part of the rectangle a bit more rounded like the bottom part of it and so I used border-radius but it didn't turn out the way I wanted.
Here is my code
.carousel-inner {
position: relative;
width: 100%;
overflow: hidden;
}
.col-center {
margin: 0 auto;
float: none !important;
}
.carousel {
margin: 0px auto;
padding: 0 70px;
height: 100%;
background: linear-gradient(180deg, white 15%,#0E2149 15%);
border-radius: 20px;
}
.carousel {
position: relative;
}
.carousel .item {
color: #fff;
font-size: 14px;
text-align: center;
overflow: hidden;
min-height: 290px;
}
.carousel .item .img-box {
width: 200px;
height: 200px;
margin: 0 auto;
padding: 5px;
border: 10px solid #0E2149;
border-radius: 50%;
background: #fff;
}
.carousel .img-box img {
width: 100%;
height: 100%;
display: block;
border-radius: 50%;
}
.carousel .testimonial {
padding: 0px 0 0px;
line-height: 1.5;
color: #fff;
}
.carousel .overview {
font-style: italic;
}
.carousel .overview b {
text-transform: uppercase;
color: #7AA641;
}
.carousel .carousel-control {
width: 40px;
height: 40px;
margin-top: -20px;
top: 50%;
background: none;
}
.carousel-control i {
font-size: 30px;
line-height: 65px;
position: absolute;
display: inline-block;
color: rgba(0, 0, 0, 0.8);
text-shadow: 0 3px 3px #e6e6e6, 0 0 0 #000;
margin-left: -5px;
}
.carousel .carousel-indicators {
bottom: -40px;
}
.carousel-indicators li, .carousel-indicators li.active {
width: 10px;
height: 10px;
margin: 1px 3px;
border-radius: 50%;
}
.carousel-indicators li {
background: #999;
border-color: transparent;
box-shadow: inset 0 2px 1px rgba(0,0,0,0.2);
}
.carousel-indicators li.active {
background: #555;
box-shadow: inset 0 2px 1px rgba(0,0,0,0.2);
}
<div class="col-md-4">
<div class="row">
<div class="col-md-12">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Carousel indicators -->
<!-- Wrapper for carousel items -->
<div class="carousel-inner">
<div class="item carousel-item active">
<div class="img-box"><img src="images/cd logo.jpg" alt=""></div>
<p class="testimonial">Some text here
</p>
<p class="overview"><b>Paula Wilson</b>, Media Analyst</p>
</div>
<div class="item carousel-item">
<div class="img-box"><img src="/examples/images/clients/2.jpg" alt=""></div>
<p class="testimonial">Text here</p>
<p class="overview"><b>Antonio Moreno</b>, Web Developer</p>
</div>
</div>
<!-- Carousel controls -->
<a class="carousel-control left carousel-control-prev" href="#myCarousel" data-slide="prev">
<i class="fa fa-angle-left"></i>
</a>
<a class="carousel-control right carousel-control-next" href="#myCarousel" data-slide="next">
<i class="fa fa-angle-right"></i>
</a>
</div>
</div>
<div id="background"></div>
</div>
</div>
How do I achieve the look at the top part of the carousel?
Instead of that gradient you can use :before or :after pseudo elements, position it absolutely, under all other content, and do what you want.
It seems that it's working perfectly as expected. The problem here is that you are not able to view it because the background color of the top bar is white and so is your body background color. If you change it to something else, you'll see the difference.
Either you change the color of the linear gradient to
.carousel {
...
background: linear-gradient(180deg, grey 15%,#0E2149 15%);
/* You can use any other color than grey, it's just for demo purpose */
...
}
Or you can use pseudo selectors for achieving what you want.
Here's an example using ::before by setting it's position to absolute:
.carousel {
/* remove linear gradient from here! */
}
.carousel::after {
position: absolute;
left: 0;
top: 15%;
content: ' ';
width: 100%;
height: 85%;
background: #0E2149;
z-index: -1; /* To keep it below the content */
border-radius: 20px;
}
.carousel::before {
position: absolute;
left: 0;
top: 0;
content: ' ';
width: 100%;
height: 20%; /* Extra 5% */
background: white;
z-index: -2; /* To keep it below the content and the ::after element */
}
Are u expecting like this:
.carousel-inner {
position: relative;
width: 100%;
overflow: hidden;
margin-bottom: 20px;
border-radius: 15px;
box-shadow: 0 4px 10px 0 rgba(0,0,0,0.2), 0 4px 20px 0 rgba(0,0,0,0.19);
}
hr{
margin:2px 40px;
background-color:#cbcbcb;
color: #cbcbcb;
border-radius: 10px;
}
.col-center {
margin: 0 auto;
float: none !important;
}
.carousel {
margin: 0px auto;
padding: 0 70px;
height: 100%;
border-radius: 20px;
}
.carousel {
position: relative;
}
.carousel .item {
color: #fff;
font-size: 14px;
background-color: white;
text-align: center;
overflow: hidden;
min-height: 290px;
position: relative;
}
.carousel .item::after{
content: "";
display: block;
background-color:#0E2149;
position: absolute;
left: 0;
right: 0;
top: 100px;
bottom: 0;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
}
.carousel .item > *{
position: relative;
z-index: 1;
}
.carousel .item .img-box {
width: 130px;
height: 130px;
margin: 0 auto;
margin-top: 25px;
border-radius: 50%;
padding: 10px;
background-color:#0E2149 ;
}
.carousel .img-box img {
width: 100%;
height: 100%;
display: block;
border-radius: 50%;
}
.carousel .testimonial {
padding: 0px 0 0px;
line-height: 1.5;
color: white;
font-weight: bold;
font-size: 30px;
}
.carousel .overview {
font-style: italic;
}
.carousel .overview b {
text-transform: uppercase;
color: #7AA641;
}
.carousel .carousel-control {
width: 40px;
height: 40px;
margin-top: -20px;
top: 50%;
background: none;
}
.carousel-control i {
font-size: 30px;
line-height: 65px;
position: absolute;
display: inline-block;
color: rgba(0, 0, 0, 0.8);
text-shadow: 0 3px 3px #e6e6e6, 0 0 0 #000;
margin-left: -5px;
}
.carousel .carousel-indicators {
bottom: -40px;
}
.carousel-indicators li, .carousel-indicators li.active {
width: 10px;
height: 10px;
margin: 1px 3px;
border-radius: 50%;
}
.carousel-indicators li {
background: #999;
border-color: transparent;
box-shadow: inset 0 2px 1px rgba(0,0,0,0.2);
}
.carousel-indicators li.active {
background: #555;
box-shadow: inset 0 2px 1px rgba(0,0,0,0.2);
}
<section class="second-section">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="row">
<div class="col-md-12">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Carousel indicators -->
<!-- Wrapper for carousel items -->
<div class="carousel-inner">
<div class="item carousel-item active">
<div class="img-box"><img src="https://dummyimage.com/300" alt=""></div>
<p class="testimonial">Some text here
</p>
<hr>
<p class="overview"><b>Paula Wilson</b>, Media Analyst</p>
</div>
</div>
<div class="carousel-inner">
<div class="item carousel-item">
<div class="img-box"><img src="https://dummyimage.com/300" alt=""></div>
<p class="testimonial">Text here</p>
<p class="overview"><b>Antonio Moreno</b>, Web Developer</p>
</div>
</div>
<div class="carousel-inner">
<div class="item carousel-item">
<div class="img-box"><img src="https://dummyimage.com/300" alt=""></div>
<p class="testimonial">Text here</p>
<p class="overview"><b>Antonio Moreno</b>, Web Developer</p>
</div>
</div>
</div>
<!-- Carousel controls -->
<a class="carousel-control left carousel-control-prev" href="#myCarousel" data-slide="prev">
<i class="fa fa-angle-left"></i>
</a>
<a class="carousel-control right carousel-control-next" href="#myCarousel" data-slide="next">
<i class="fa fa-angle-right"></i>
</a>
</div>
</div>
<div id="background"></div>
</div>
</div>
</div>
</section>

Button not clickable in IE, but works in modern browsers

In the example here, button.vertical-button__btn with the text "Description" is hoverable and clickable in all browsers but IE. (I've put a CSS border on hover to illustrate this. You can also see when the button is clickable by the 'hand' pointer appearing.)
A caveat: When I say it is not clickable in IE, I mean that the full button text (highlighted in yellow) is not clickable. Oddly, the extreme right edge of the button element does click and hover as intended.
What is causing this behavior, and how can I make the functionality the same in IE as with modern browsers?
I am only interested in supporting IE 11 and Edge... IE 10 and under do not need to be supported.
Edit:
Another odd behavior: If I remove the element div.project__image The button becomes clickable, but I cannot figure out why, and I need the div element to remain.
.project {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
padding: 20px;
margin: 30px auto;
width: 740px;
height: 295px;
box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
}
.project__image, .project__text {
position: relative;
width: 280px;
max-width: 408px;
height: 210px;
display: inline-block;
margin: 0 auto;
}
.project__text {
height: 200px;
padding: 20px 8px 20px 8px;
}
.vertical-button {
width: 1px;
height: 20px;
background: #000;
position: absolute;
right: -100px;
top: calc(50% - 10px);
display: flex;
flex-direction: column;
justify-content: center;
opacity: 1;
-webkit-transition: 0.8s;
-moz-transition: 0.8s;
-ms-transition: 0.8s;
-o-transition: 0.8s;
transition: 0.8s;
}
.vertical-button__btn,
.vertical-button__btn:focus,
.vertical-button__btn:active {
background: none;
border: none;
display: inline;
font: inherit;
margin: 0;
padding: 0;
outline: none;
outline-offset: 0;
position: absolute;
top: 0px;
transform-origin: left top;
transform: rotate(90deg) translateX(-32%);
float: right;
padding: 5px;
cursor: pointer;
cursor: hand;
}
.vertical-button__btn:hover {
border: 1px solid red;
}
.vertical-button__stroke {
width: 1000px;
height: 1px;
background: #000;
}
<div class="project project--active">
<div class="project__image">
<a href="http://www.soupisgoodfood.com">
<img class="image" alt="soupisgoodfood.com" src="img/hl.jpg">
</a>
</div>
<div class="project__text">
<h3 class="project__heading">Soup Overflow</h3>
<p class="project__tagline">Soup Overflow, the creative agency of Vegetables</p>
<ul>
<li class="project__list-item">
<a class="project__link" href="http://www.soupisgoodfood.com">View Flavors</a>
</li>
<li class="project__list-item project__button">
<a class="project__link" href="">Description</a>
</li>
</ul>
<div class="vertical-button">
<button class="vertical-button__btn" style="background-color: yellow;">Description</button>
<div class="vertical-button__stroke"></div>
</div>
</div>
</div>
I do believe that it's a matter of z-index.
If you add a z-index: 200 to your vertical-button, the button will be clickable, even in IE.
.project {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
padding: 20px;
margin: 30px auto;
width: 740px;
height: 295px;
box-shadow: 0px 4px 10px rgba(0,0,0,0.3);
}
.project__image, .project__text {
position: relative;
width: 280px;
max-width: 408px;
height: 210px;
display: inline-block;
margin: 0 auto;
}
.project__text {
height: 200px;
padding: 20px 8px 20px 8px;
}
.vertical-button {
width: 1px;
height: 20px;
background: #000;
position: absolute;
right: -100px;
top: calc(50% - 10px);
display: flex;
flex-direction: column;
justify-content: center;
opacity: 1;
-webkit-transition: 0.8s;
-moz-transition: 0.8s;
-ms-transition: 0.8s;
-o-transition: 0.8s;
transition: 0.8s;
z-index: 200
}
.vertical-button__btn,
.vertical-button__btn:focus,
.vertical-button__btn:active {
background: none;
border: none;
display: inline;
font: inherit;
margin: 0;
padding: 0;
outline: none;
outline-offset: 0;
position: absolute;
top: 0px;
transform-origin: left top;
transform: rotate(90deg) translateX(-32%);
float: right;
padding: 5px;
cursor: pointer;
cursor: hand;
}
.vertical-button__btn:hover {
border: 1px solid red;
}
.vertical-button__stroke {
width: 1000px;
height: 1px;
background: #000;
}
<div class="project project--active">
<div class="project__image">
<a href="http://www.soupisgoodfood.com">
<img class="image" alt="soupisgoodfood.com" src="img/hl.jpg">
</a>
</div>
<div class="project__text">
<h3 class="project__heading">Soup Overflow</h3>
<p class="project__tagline">Soup Overflow, the creative agency of Vegetables</p>
<ul>
<li class="project__list-item">
<a class="project__link" href="http://www.soupisgoodfood.com">View Flavors</a>
</li>
<li class="project__list-item project__button">
<a class="project__link" href="">Description</a>
</li>
</ul>
<div class="vertical-button">
<button class="vertical-button__btn" style="background-color: yellow;">Description</button>
<div class="vertical-button__stroke"></div>
</div>
</div>
</div>

Z-Index is "not working"

I'm learning HTML and CSS and have some problems. Thare are 3 html elements.
First one is navigation bar.
Seconde one is button in that navigation.
Third one is dropdown menu.
Basicly, i wont on hover of 2nd element slide down 3th one.
And i get that. Problem is 3th element when sliding down it appears OVER 1st and 2nd. element. With opacity 0.99 i managed to slid it UNDER element 2. But its still OVER element 1.
How can i put it under all. Is it possible?
Here is example of my code. https://jsfiddle.net/eth66zea/
.su-drop {
position: absolute;
left: 0px;
top: -100px;
height: 100px;
min-width: 200px;
background-color: greenyellow;
transition: all 0.333s;
z-index: -1;
display: inline;
opacity: 0.99
}
.su-header {
position: relative;
height: 70px;
color: white;
background-color: black;
border-bottom: 2px #1f7caf solid;
margin-bottom: 10px;
z-index: 5;
}
.su-header .su-ul {
position: relative;
list-style-type: none;
font-size: 16px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 10%;
}
.su-header .su-ul .su-li{
position: relative;
float: left;
padding: 10px 10px;
line-height: 50px;
min-width: 100px;
text-align: center;
transition: all 0.6s;
cursor: pointer;
display: inline;
}
.su-header .su-ul .su-li:hover{
background-color: #1f7caf;
}
.su-header .su-li:last-child:hover > .su-drop{
top: 70px;
}
<div class="su-header">
<ul class="su-ul">
<li class="su-li"><i class="fa fa-heartbeat" aria-hidden="true"></i></li>
<li class="su-li">Test1</li>
<li class="su-li">Test2</li>
<li class="su-li">
Dropdown
<div class="su-drop"></div>
</li>
</ul>
</div>
Thx for your help.
Here is one way of doing it that gets around the z-index problem.
Instead of doing the transition on the top offset, you can try doing the transition on the height value.
Position the .su-drop element where you need it (bottom of .su-li) and give it an initial height of 0. On hover, you then set the height to the desired value.
If you want the sliver of color at the top, you would need to add a second element, .su-drop-up, but this may be optional.
If you don't have a height value for .su-drop, then you might need to alter your HTML, it all depends on the details of your layout and design.
.su-drop {
position: absolute;
left: 0px;
bottom: 0px;
height: 0px;
min-width: 200px;
background-color: greenyellow;
transition: all 0.333s;
z-index: -1;
display: inline;
opacity: 0.97
}
.su-drop-up {
position: absolute;
left: 0px;
top: -10px;
height: 10px;
min-width: 200px;
background-color: greenyellow;
transition: all 0.333s;
z-index: -1;
display: inline;
opacity: 0.97
}
.su-header {
position: relative;
height: 70px;
color: white;
background-color: black;
border-bottom: 2px #1f7caf solid;
margin-bottom: 10px;
z-index: 5;
opacity: 1;
}
.su-header .su-ul {
position: relative;
list-style-type: none;
font-size: 16px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 10%;
opacity: 0.98;
}
.su-header .su-ul .su-li {
position: relative;
float: left;
padding: 10px 10px;
line-height: 50px;
min-width: 100px;
text-align: center;
transition: all 0.6s;
cursor: pointer;
display: inline;
}
.su-header .su-ul .su-li:hover {
background-color: #1f7caf;
}
.su-header .su-li:last-child:hover > .su-drop {
height: 100px;
bottom: -100px;
}
.su-header .su-li:last-child:hover > .su-drop-up {
height: 0px;
}
<div class="su-header">
<ul class="su-ul">
<li class="su-li"><i class="fa fa-heartbeat" aria-hidden="true"></i>
</li>
<li class="su-li">Test1</li>
<li class="su-li">Test2</li>
<li class="su-li">
Dropdown
<div class="su-drop-up"></div>
<div class="su-drop"></div>
</li>
</ul>
</div>
Change your Height Property
.su-drop {
position: absolute;
left: 0px;
top:70px;
height: 0px;
min-width: 200px;
background-color: greenyellow;
transition: all 0.333s;
z-index: -1;
display: inline;
opacity: 0.97
}
.su-header .su-li:last-child:hover > .su-drop{
height:100px;
}
Working Demo https://jsfiddle.net/Rahul_Ravi/eth66zea/3/

CSS only image gallery with thumbnails and zoom

Is it possible to have an image gallery with thumbnails and big preview with zoom? Something like cloudzoom but without any JS, jQuery, Scripts etc as all form of 'scripts and actions' are forbidden and will not work.
We can only use HTML5 and CSS3 no scripts
thanks
Look on this. Hope it helps you.
#images-box {
/* The total width of the image-box, mainly for centering */
width: 850px;
margin: 0px auto;
position: relative;
top: 70px;
}
.image-lightbox img {
/* Inherit the width and height from the parent element */
width: inherit;
height: inherit;
}
.holder {
/* The width and height, you can change these */
width: 250px;
height: 166px;
/* Float left, so everything aligns right */
float: left;
margin: 0 20px 0 0;
}
.image-lightbox {
/* Inherit width and height from the .holder */
width: inherit;
height: inherit;
padding: 10px;
/* Box shadow */
box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
background: #fff;
border-radius: 5px;
/* Position absolutely so we can zoom it out later */
position: absolute;
top: 0;
font-family: Arial, sans-serif;
/* Transitions to provide some eye candy */
-webkit-transition: all ease-in 0.5s;
-moz-transition: all ease-in 0.5s;
-ms-transition: all ease-in 0.5s;
-o-transition: all ease-in 0.5s;
}
.image-lightbox span {
display: none;
}
.image-lightbox .expand {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.image-lightbox .close {
position: absolute;
width: 20px; height: 20px;
right: 20px; top: 20px;
}
.image-lightbox .close a {
height: auto; width: auto;
padding: 5px 10px;
color: #fff;
text-decoration: none;
background: #22272c;
box-shadow: inset 0px 24px 20px -15px rgba(255, 255, 255, 0.1), inset 0px 0px 10px rgba(0,0,0,0.4), 0px 0px 30px rgba(255,255,255,0.4);
border-radius: 5px;
font-weight: bold;
float: right;
}
.close a:hover {
box-shadow: inset 0px -24px 20px -15px rgba(255, 255, 255, 0.01), inset 0px 0px 10px rgba(0,0,0,0.4), 0px 0px 20px rgba(255,255,255,0.4);
}
div[id^=image]:target {
width: 450px;
height: 300px;
z-index: 5000;
top: 50px;
left: 200px;
}
div[id^=image]:target .close {
display: block;
}
div[id^=image]:target .expand {
display: none;
}
div#image-1:target, div#image-2:target, div#image-3:target { left: 200px; }
div#image-1 { left: 0; }
div#image-2 { left: 290px; }
div#image-3 { left: 580px; }
<div id="images-box">
<div class="holder">
<div id="image-1" class="image-lightbox">
<span class="close">X</span>
<img src="http://www.techinsights.com/uploadedImages/Public_Website/Content_-_Primary/Teardowncom/Sample_Reports/sample-icon.png" alt="earth!">
<a class="expand" href="#image-1"></a>
</div>
</div>
<div class="holder">
<div id="image-2" class="image-lightbox">
<span class="close">X</span>
<img src="http://www.techinsights.com/uploadedImages/Public_Website/Content_-_Primary/Teardowncom/Sample_Reports/sample-icon.png" alt="earth!">
<a class="expand" href="#image-2"></a>
</div>
</div>
<div class="holder">
<div id="image-3" class="image-lightbox">
<span class="close">X</span>
<img src="http://www.techinsights.com/uploadedImages/Public_Website/Content_-_Primary/Teardowncom/Sample_Reports/sample-icon.png" alt="earth!">
<a class="expand" href="#image-3"></a>
</div>
</div>
</div>
You can use css hover to implement image zoom. And using hover property you can create a Image zoom gallery pretty much like you want.
Here is a sample for it.
https://codepen.io/Remedy/pen/ZYJrpp
<style>
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
}
.item {
position: relative;
border: 1px solid #333;
margin: 2%;
overflow: hidden;
width: 540px;
}
.item img {
max-width: 100%;
-moz-transition: all 0.3s;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
.item:hover img {
-moz-transform: scale(1.1);
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
</style>
<div class="item">
<img src="https://upload.wikimedia.org/wikipedia/en/thumb/5/58/Pepsi_logo.svg/1280px-Pepsi_logo.svg.png" alt="pepsi" width="540" height="548">
<div class="item-overlay top"></div>
</div>
You can also have a look at these links below for complete implementation.
https://codepen.io/elad2412/pen/yfEGp
https://codepen.io/samuelmaggs/pen/ZWpjPN
It is not possible to zoom a image without javascript or JQuery, we need to use a Javascript or JQuery functiononmouseover