Fiddle Example
Can anyone figure out how to get the button overlapped by flyout-content so that the right border of the button is hidden ? I want to get this effect:

I have tried changing the z-index of the content and the button, however it doesn't work.
<div class='flyout'>
<button class="flyout-toggle">Click</button>
<div class="flyout-content"></div>
</div>
.flyout-toggle {
position: absolute;
transform: rotate(90deg);
top: 50%;
left: -50px;
z-index: 998;
width: 85px;
height: 35px;
font-size: 13px;
background: #92C7B8;
border: solid #fff 1px;
}
.flyout-content {
z-index:997
}
.flyout {
position: fixed;
z-index: 999;
top: 0;
right: 0;
width: 15%;
height: 100%;
border-left: solid #fff 1px;
background: #92C7B8;
-webkit-box-shadow: 0px -5px 15px 0px #bfbfbf;
box-shadow: 0px -5px 15px 0px #bfbfbf;
transition: all .3s ease-in-out;
}
jus add this border:none;
.flyout-toggle {
background: none repeat scroll 0 0 #92c7b8;
border: medium none;
font-size: 13px;
height: 35px;
left: -50px;
position: absolute;
top: 50%;
transform: rotate(90deg);
width: 85px;
z-index: 998;
}
but if you need a border you can add it where you need ie border-top border-left border-right; like this DEMO
You can use border-top: none and outline: none:
.flyout-toggle {
position: absolute;
transform: rotate(90deg);
top: 50%;
left: -60px;
z-index: 998;
width: 85px;
height: 35px;
font-size: 13px;
background: #92C7B8;
border: solid #fff 1px;
border-top: none;
outline: none;
}
fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With