Hover off transition is not working - html

I have a Login "Button", when hovering, a login Form should become visible. It should expand from the button.
It works fine on hover, but when the mouse leave the button (hover off) the transition is not working.
Hope it is clear, what i want to achiev.
Here is a simplified fiddle with the problem:
https://jsfiddle.net/ze7qpx02/
Thank you!
body{
margin-left: 300px;
}
.parent {
padding: 5px;
border-width: thin;
border-style: solid;
font-size: 15px;
position: relative;
display: inline-block;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.parent:hover {
border-bottom-color: transparent;
padding-bottom: 30px;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.child{
position: absolute;
height: 0px;
width: 100%;
bottom: 0;
right: -1px;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.parent:hover .child{
height: calc(240px - 100%);
bottom: calc(-240px + 100%);
width: 240px;
border-style: solid;
border-width: thin;
border-top-style: none;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
<div class="parent">
Login
<div class="child">
</div>
</div>

Since you add the border to child only when the parent is hovered, it disappears immediately when the hover end. You can add the border to the child with a transparent color, and change the color when hovered.
btw - unless the transitions change when hovered, you can set them only on the elements, no need to include them again on the hovered state.
body {
margin-left: 300px;
}
.parent {
padding: 5px;
border-width: thin;
border-style: solid;
font-size: 15px;
position: relative;
display: inline-block;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.parent:hover {
border-bottom-color: transparent;
padding-bottom: 30px;
}
.child {
position: absolute;
height: 0px;
width: 100%;
bottom: 0;
right: -1px;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all 0.3s ease-in-out;
border: transparent solid thin;
border-top-style: none;
}
.parent:hover .child {
height: calc(240px - 100%);
bottom: calc(-240px + 100%);
width: 240px;
border-color: black;
}
<div class="parent">
Login
<div class="child">
</div>
</div>

Actually the transition is working. Your problem is the border get lost suddenly. So copy this to your .child, you will see that is working;
border-style: solid;
border-width: thin;
border-top-style: none;

The transition works but you cannot 'see' it because .child does not have border set on it's default style. The border is only on parent hover. So when you 'un hover' , the border disappears instantly.
So you should set the border to the default style ( transparent if you want ) and then on hover set a a color to that border . Also, transitions don't have to be used on both default and hover state. ( if they are the same ) . Use them only on default styles and so they will work on both states.
See snippet below
body {
margin-left: 300px;
}
.parent {
padding: 5px;
border-width: thin;
border-style: solid;
font-size: 15px;
position: relative;
display: inline-block;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.parent:hover {
border-bottom-color: transparent;
padding-bottom: 30px;
}
.child {
position: absolute;
height: 0px;
width: 0px;
bottom: 0;
right: -1px;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
border-style: solid;
border-width: thin;
border-top-style: none;
border-color: transparent;
}
.parent:hover .child {
height: calc(240px - 100%);
bottom: calc(-240px + 100%);
width: 240px;
border-color: red;
}
<div class="parent">
Login
<div class="child">
</div>
</div>

Its working Try this....
body{
margin-left: 300px;
}
.parent {
padding: 5px;
border-width: thin;
border-style: solid;
font-size: 15px;
position: relative;
display: inline-block;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.parent:hover {
border-bottom-color: transparent;
padding-bottom: 30px;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.child{
position: absolute;
height: 0px;
width: 100%;
bottom: 0;
right: -1px;
border-style: solid;
border-width: thin;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
.parent:hover .child{
height: calc(240px - 100%);
bottom: calc(-240px + 100%);
width: 240px;
-webkit-transition: all .3s ease-in-out;
-moz-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
-ms-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
}
<div class="parent">
Login
<div class="child">
</div>
</div>

Related

how to move arrow to right on hover?

How can I make padding for an arrow move the arrow to right on hover?
That is, arrow moves from the text to the right, and when hover disappears, it returns to its place.
#next {
cursor: pointer;
position: absolute;
float: right;
top: 50%;
width: auto;
color: #383736;
font-weight: bold;
font-size: 20px;
user-select: none;
right: 75px;
transition: 0.2s ease-in;
-o-transition: 0.2s ease-in;
-ms-transition: 0.2s ease-in;
-moz-transition: 0.2s ease-in;
-webkit-transition: 0.2s ease-in;
}
#next:before{
content:"Next";
position:absolute;
color:#383736;
right: 50%;
opacity: 0;
-webkit-transition: all 1000ms cubic-bezier(0.680, -0.550, 0.265, 1.550);
padding-right: 5px;
}
#next:hover:before{
right:100%;
transition: 0.6s ease-in;
-o-transition: 0.6s ease-in;
-ms-transition: 0.6s ease-in;
-moz-transition: 0.6s ease-in;
-webkit-transition: 0.6s ease-in;
opacity:1;
}
<a id="next"><span class="arrow">⟶</span></a>
You can use a translation on the arrow element (the span):
#next {
cursor: pointer;
position: absolute;
float: right;
top: 50%;
width: auto;
color: #383736;
font-weight: bold;
font-size: 20px;
user-select: none;
right: 75px;
transition: 0.2s ease-in;
}
#next:before {
content:"Next";
position:absolute;
color:#383736;
right: 50%;
opacity: 0;
transition: 0.6s ease-in;
padding-right: 5px;
}
#next:hover:before {
opacity: 1;
}
#next span {
display: inline-block;
transition: 0.6s ease-in;
}
#next:hover span {
transform: translateX(50%);
}
<a id="next"><span class="arrow">⟶</span></a>
try this...
#next {
cursor: pointer;
position: absolute;
float: right;
top: 50%;
width: auto;
color: #383736;
font-weight: bold;
font-size: 20px;
user-select: none;
right: 75px;
transition: 0.2s ease-in;
-o-transition: 0.2s ease-in;
-ms-transition: 0.2s ease-in;
-moz-transition: 0.2s ease-in;
-webkit-transition: 0.2s ease-in;
}
#next:before{
content:"Next";
position:absolute;
color:#383736;
left: 50%; // <--- here
opacity: 0;
-webkit-transition: all 1000ms cubic-bezier(0.680, -0.550, 0.265, 1.550);
padding-right: 5px;
}
#next:hover:before{
left:100%; // <--- here
transition: 0.6s ease-in;
-o-transition: 0.6s ease-in;
-ms-transition: 0.6s ease-in;
-moz-transition: 0.6s ease-in;
-webkit-transition: 0.6s ease-in;
opacity:1;
}

CSS Transition not working on hover

I am having an issue. When I hover over the image, a dark overlay appears but CSS Transition property is not working on it.
Here is the html:
<div class="col-md-12">
<div class="collection-category">
<img src="http://dummyimage.com/600x400/#C1C1C1/fff" />
<a href="#">
<div class="overlay_wrap">
<div class="overlay">
<h2 class="collection_title">Headline One</h2>
</div>
</div>
</a>
</div>
</div>
And CSS is:
.collection-category {
display: block;
overflow: hidden;
margin: 10px 0;
position: relative;
}
.collection-category img {
width: 100%;
max-height: 250px;
}
.collection_title {
display: table-cell;
vertical-align: middle;
font-size: 28px;
}
.overlay_wrap {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
-moz-transition: all .2s ease-in-out;
-webkit-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
.overlay {
display: none;
background: rgba(2, 2, 2, 0.61);
color: #FFF;
text-align: center;
-moz-transition: all .2s ease-in-out;
-webkit-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
.collection-category:hover>a>.overlay_wrap>.overlay {
display: table;
height: 100%;
width: 100%;
}
Here is the JSFiddle
http://jsfiddle.net/cnbvoe32/
Any help would be highly appreciated.
thanks in advance.
It's because you can't transition from display: none to display: table.
Instead, you could transition the opacity property by setting the initial display to table along with opacity: 0 and then transitioning to opacity: 1:
Updated Example
.overlay {
display: table;
background: rgba(2, 2, 2, 0.61);
color: #FFF;
text-align: center;
-moz-transition: all .2s ease-in-out;
-webkit-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
opacity: 0;
height: 100%;
width: 100%;
}
.collection-category:hover>a>.overlay_wrap>.overlay {
opacity: 1;
}

How do I set reduced width to a div

I have 4 divs floating left next to each other with a set hover width transition, three divs are the same width but the fourth is smaller. When you hover up on the div it gets bigger and I need the rest to reduce the width automaticaly to the set reduced-width value.
Here is the code
.container1 {
position: relative;
height: 600px;
width: 29%;
top: 0px;
left: 0%;
float: left;
z-index: 99;
opacity: 1;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
border-right: #000 4px solid;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container1:hover {
width: 40%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container1 .reduced-width {
width: 20%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out; }
#image1 {
background: url("../img/bg1.jpg");
}
.container2 {
position: relative;
height: 600px;
width: 29%;
top: 0px;
left: 0%;
float: left;
z-index: 99;
opacity: 1;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
border-right: #000 4px solid;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container2:hover {
width: 40%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container2 .reduced-width {
width: 20%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out; }
#image2 {
background: url("../img/bg2.jpg");
}
.container3 {
position: relative;
height: 600px;
width: 29%;
top: 0px;
left: 0%;
float: left;
z-index: 99;
border-right: #000 4px solid;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container3:hover {
width: 40%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container3 .reduced-width {
width: 20%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
#image3 {
background: url("../img/bg3.jpg");
}
.container4 {
position: relative;
height: 600px;
width: 13%;
top: 0px;
left:0%;
z-index: 999;
float: right;
opacity: 1;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
border-right: #000 4px solid;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container4:hover {
width: 30%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
#image4 {
background: url("../img/3.jpg");
}
And the HTML
<div class="container1 animated bounceInLeft reduced-width" id="image1">
</div>
<div class="container2 animated bounceInDown reduced-width" id="image2">
</div>
<div class="container3 animated bounceInDown reduced-width" id="image3">
</div>
<div class="container4 animated bounceInRight reduced-width" id="image4">
</div>
when you are targeting 2 classes you should do it without spaces( like you did .container1 .reduced-width it should be .container1.reduced-width)
set width in such a way that your design won't break.. like your width of all containers should be 24%(as you have 4px border too) so that total will be equal or less than 100%.
You should write least css and target more elements. like you are targeting a particular div everytime which is not advisible.. you could use reduced with class only once and it would have set the size everytime.
this could be your reduced/optimized code:
HTML:
<div class="container animated bounceInLeft" id="image1"></div>
<div class="container animated bounceInDown" id="image2"></div>
<div class="container animated bounceInDown" id="image3"></div>
<div class="container animated bounceInRight" id="image4"></div>
CSS:
.container {
position: relative;
height: 600px;
width: 24%;
top: 0px;
left: 0%;
float: left;
z-index: 99;
opacity: 1;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
border-right: #000 4px solid;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
background-color:red;
}
.container:hover {
width: 40%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container.reduced-width {
width: 20%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out; }
#image1 {
background: red;
}
#image2 {
background: yellow;
}
#image3 {
background: green;
}
#image4 {
background: blue ;
}
Here is CodePen Link
You don't need to do all that stuff for doing what you want. You can do it without any Javascript or jQuery using just CSS3.
Wrap your divs in a container.
Apply display: flex for the container.
Apply flex: 1 1 to the children. This is important.. do not give any flex-basis.. let it default.
Give a width: 100%; to children, they will automatically grow/shrink to available space.
Apply flex: 1 1 <your-width> for :hover on children. That's it.
Demo Fiddle: http://jsfiddle.net/abhitalks/xghqmq6u/
See this snippet:
.wrap {
width: 100%;
display: flex;
flex-direction: columns;
}
.floaters {
flex: 1 1 0%;
height: 120px; width: 100%;
transition: all 500ms;
}
.floaters:hover { flex: 1 1 50%; }
.container1 { background-color: #f00;}
.container2 { background-color: #0f0;}
.container3 { background-color: #00f;}
.container4 { background-color: #ccc;}
<div class="wrap">
<div class="container1 floaters" id="image1"></div>
<div class="container2 floaters" id="image2"></div>
<div class="container3 floaters" id="image3"></div>
<div class="container4 floaters" id="image4"></div>
</div>
This is how you can fix it.
HTML (you don't need a wrapper)
<div class="container1 animated bounceInLeft" id="image1"></div>
<div class="container2 animated bounceInDown" id="image2"></div>
<div class="container3 animated bounceInDown" id="image3"></div>
<div class="container4 animated bounceInRight" id="image4"></div>
CSS
.container {
position: relative;
height: 600px;
width: 24%;
top: 0px;
left: 0%;
float: left;
z-index: 99;
opacity: 1;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
border-right: #000 4px solid;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
background-color:red;
}
.container:hover {
width: 35%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container.reduced-width {
width: 20%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out; }
#image1 {
background: red;
}
#image2 {
background: yellow;
}
#image3 {
background: green;
}
#image4 {
background: blue ;
}
And of course you need Javascript (Jquery here)
$('.animated').mouseenter(function(){
console.log('here');
$(this).removeClass('reduced-width').siblings('.animated').addClass('reduced-width');
}).mouseout(function(){
$('.animated').removeClass('reduced-width');
});
EDIT: now the 4th column has a smaller width
Here is an example how you could fix it: http://jsfiddle.net/intergalactic_overlords/0hLmrme4/
Html needs a wrapper. When hovering the wrapper, children (the containers) width is set to 20%. When hovering a specific container, its width is set to 40%.
<div class="container-wrap">
<div class="container container1 animated bounceInLeft reduced-width" id="image1">
</div>
<div class="container container2 animated bounceInDown reduced-width" id="image2">
</div>
<div class="container container3 animated bounceInDown reduced-width" id="image3">
</div>
<div class="container container4 animated bounceInRight reduced-width" id="image4">
</div>
</div>
CSS:
.container {
background:snow;
box-sizing:border-box;
position: relative;
height: 600px;
width: 23%;
float: left;
z-index: 99;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
border-right: #000 4px solid;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container-4 {
width: 21%;
}
.container-wrap:hover > div {
width: 21%;
}
.container-wrap:hover > .container4 {
width: 16%;
}
.container-wrap > .container:hover {
background: yellow;
width: 42%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}
.container-wrap > .container4:hover {
background: yellow;
width: 37%;
transition: all 300ms ease-in-out;
-o-transition: all 300ms ease-in-out;
-moz-transition: all 300ms ease-in-out;
-webkit-transition: all 300ms ease-in-out;
}

After transition is complete, show the div

Dear Stackoverflow readers,
Using only CSS3, how do I show a div after a transition is completed.
This is the snippet of HTML I'm working with
<div class="biography">
<p>Title</p>
<p id="moreBio">This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.</p>
</div>
This is the snippet of CSS3 I'm working with
.biography {
width: 100px;
height: 40px;
float: left;
margin: 5px;
background: #3399FF;
color: #ffffff;
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
position: relative;
right: 5%;
font-weight: bold;
font-size: 15px;
text-align: center;
padding: 10px;
border-radius: 5px;
opacity: 0.4;
transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
}
.biography:hover {
width: 200px;
height: 600px;
margin: 10px 10px 0px -100px;
opacity: 1;
background: #7C7C7C;
}
#moreBio {
opacity: 0;
transition: opacity 0.5s ease;
-webkit-transition: opacity 0.5s ease;
-o-transition: opacity 0.5s ease;
-moz-transition: opacity 0.5s ease;
}
#moreBio:hover {
opacity: 1;
}
I want #moreBio to show after the transition is completed, how would I go about doing that?
Thank you so much in advance.
Add a transition-delay to #moreBio equal to the transition time of .biography, and make the appearance trigger when .biography is hovered upon.
#moreBio {
opacity: 0;
transition: opacity 0.5s 0.5s ease;
-webkit-transition: opacity 0.5s 0.5s ease;
-o-transition: opacity 0.5s 0.5s ease;
-moz-transition: opacity 0.5s 0.5s ease;
}
.biography:hover #moreBio {
opacity: 1;
}
Instead of doing #moreBio:hover you could do .biography:hover #moreBio and then add a delay for the #moreBio transition like so
// ... other code just like it's
#moreBio {
opacity: 0;
transition: opacity 0.5s ease;
-webkit-transition: opacity 0.5s ease;
-o-transition: opacity 0.5s ease;
-moz-transition: opacity 0.5s ease;
-webkit-transition-delay: 0.5s;
transition-delay: 0.5s;
}
.biography:hover #moreBio {
opacity: 1;
}
Here is the working sample.

HTML elements are moving badly while animation

i have a problem, HTML elements are moving while animation, i have captured 2 pics to guess what i want...
Before animation:
http://i031.radikal.ru/1406/9a/41e9b81ddaed.png
After animation:
http://i057.radikal.ru/1406/1b/c5e3f763fd98.png
all i want is, that after "transition", elements stay on their line...
Here is some HTML and CSS code
HTML
<div id="sliderdiv">
<ul>
<li>
<div id="bullets">
<div class="bullet" id="bul1"></div>
<div class="bullet" id="bul2"></div>
<div class="bullet" id="bul3"></div>
<div class="bullet" id="bul4"></div>
<div class="bullet" id="bul5"></div>
</div>
</li>
<li>
<div id="sliderimages">
<img src="sliderimages/bilberry.png">
<img src="sliderimages/dogrose.png">
<img src="sliderimages/dryedbilberry.png">
<img src="sliderimages/dryeddogrose.png">
<img src="sliderimages/dryedherbs.png">
<img src="sliderimages/wildapple.png">
</div>
</li>
<li>
<div id="arrows">
<div id="slideup"></div>
<div id="slidedown"></div>
</div>
</li>
</ul>
CSS
#sliderdiv{
text-align: center;
padding-top: 40px;
height: 771px;
width: 100%;
}
#sliderimages{
overflow: hidden;
text-align: center;
height: 771px;
width: 1187px;
}
#sliderdiv ul li{
list-style: none;
display: inline-block;
}
#arrows{
width: 26px;
margin-left: 5px;
}
#slideup{
margin-bottom: 10px;
}
#slideup{
cursor: pointer;
width: 26px;
height: 18px;
background-image: url('slideup.png');
-webkit-transition: background-image 0.5s ease-in-out;
-moz-transition: background-image 0.5s ease-in-out;
-ms-transition: background-image 0.5s ease-in-out;
-o-transition: background-image 0.5s ease-in-out;
transition: background-image 0.5s ease-in-out;
}
#slideup:hover{
background-image: url('slideuph.png');
-webkit-transition: background-image 0.5s ease-in-out;
-moz-transition: background-image 0.5s ease-in-out;
-ms-transition: background-image 0.5s ease-in-out;
-o-transition: background-image 0.5s ease-in-out;
transition: background-image 0.5s ease-in-out;
}
#slidedown{
cursor: pointer;
overflow: hidden;
margin-bottom: 380px;
width: 26px;
height: 18px;
background-image: url('slidedown.png');
-webkit-transition: background-image 0.5s ease-in-out;
-moz-transition: background-image 0.5s ease-in-out;
-ms-transition: background-image 0.5s ease-in-out;
-o-transition: background-image 0.5s ease-in-out;
transition: background-image 0.5s ease-in-out;
}
#slidedown:hover{
background-image: url('slidedownh.png');
-webkit-transition: background-image 0.5s ease-in-out;
-moz-transition: background-image 0.5s ease-in-out;
-ms-transition: background-image 0.5s ease-in-out;
-o-transition: background-image 0.5s ease-in-out;
transition: background-image 0.5s ease-in-out;
}
.bullet{
position: relative;
background-color: #747474;
width: 10px;
height: 10px;
margin-bottom: 15px;
border-radius: 30px;
border: none;
-webkit-transition: background-color, border 0.2s ease-in-out;
-moz-transition: background-color, border 0.2s ease-in-out;
-ms-transition: background-color, border 0.2s ease-in-out;
-o-transition: background-color, border 0.2s ease-in-out;
transition: background-color, border 0.2s ease-in-out;
}
.bullet:last-child{
margin-bottom: 350px;
}
.bullet:hover{
border-left: 5px;
border: solid 5px #747474;
background-color: #eeeeee;
-webkit-transition: background-color, border 0.2s ease-in-out;
-moz-transition: background-color, border 0.2s ease-in-out;
-ms-transition: background-color, border 0.2s ease-in-out;
-o-transition: background-color, border 0.2s ease-in-out;
transition: background-color, border 0.2s ease-in-out;
}
.bullet:last-child:hover{
margin-bottom: 350px;
}
#bullets{
margin-right: 10px;
}
You can set initial value for border property to 5px solid #FFFFFF to .bullet selector. Assuming here color #FFFFFF is the background color of your page (so it looks transparent).
And when hovering over the bullets replace border shorthand property with single longhand property border-color: #747474; inside the pseudo selector :hover, while border-width and border-style will be inherited from the initial border value 5px and solid
DEMO
Try adding this to your classes:
.bullet{
position: relative;
}
.bullet:hover{
right: 5px;
top: -5px;
margin-bottom: 5px;
}