to see if anyone can tell me why my css button has a radius of action as big around, is there any way to reduce it?
When I put the mouse over the hand that goes in idle state goes far beyond the text of the button, I would like to reduce this area of action, but not as in css
Thank you.
CSS:
/*BOTONES SUPERIOR*/
#botonera-blogsuperior {
width: 900px;
height: 35px;
}
.texto-botones-blogsuperior {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-style: normal;
line-height: 10px;
color: #FFF;
padding-top: 0px;
padding-bottom: 0px;
margin-left: 10px;
}
.menu-blogsuperior,
.menu-blogsuperior ul,
.menu-blogsuperior li,
.menu-blogsuperior a {
margin: 0;
padding: 0;
border: none;
outline: none;
}
.menu-blogsuperior {
height: 31px;
width: 900px;
}
.menu-blogsuperior li {
position: relative;
list-style: none;
float: right;
display: block;
height: 21px;
}
.menu-blogsuperior li a {
display: block;
padding: 0 0px;
padding-right: 15px;
margin: 25px -59px;
margin-right: 12px;
line-height: 22px;
text-decoration: none;
background-image: url (boton-fondo-probar.png);
background-repeat:no-repeat;
background-position:center;
height:27px;
width:105px;
background-position:46px -1px;
background-size:69px 24px;
font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 14px;
color: #000000;
-webkit-transition: color .2s ease-in-out;
-moz-transition: color .2s ease-in-out;
-o-transition: color .2s ease-in-out;
-ms-transition: color .2s ease-in-out;
transition: color .2s ease-in-out;
text-align: right;
text-align: right;
text-align: right;
text-align: right;
}
.menu-blogsuperior li:first-child a { border-left: none; }
.menu-blogsuperior li:last-child a{ border-right: none; }
.menu-blogsuperior li:hover > a {
color: #FF6C6C;
}
.menu-blogsuperior ul {
position: absolute;
top: -109px;
left: 0;
opacity: 0;
background: #1f2024;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
-webkit-transition: opacity .10s ease .1s;
-moz-transition: opacity .10s ease .1s;
-o-transition: opacity .10s ease .1s;
-ms-transition: opacity .10s ease .1s;
transition: opacity .10s ease .1s;
}
.menu-blogsuperior li:hover > ul { opacity: 1; }
.menu-blogsuperior ul li {
height: 0;
overflow: hidden;
padding: 0;
}
.menu-blogsuperior li:hover > ul li {
height: 36px;
overflow: visible;
padding: 0;
}
.menu-blogsuperior ul li a {
width: 36px;
padding: 10px 0 1px 10px;
margin: 0;
border: none;
border-bottom: 0px solid #353539;
}
.menu ul-blogsuperior li:last-child a { border: none; }
HTML
<div class="botonera-blogsuperior"><ul class="menu-blogsuperior">
<li>INDICE</li>
<li>DINO</li>
<li>LEONES</li>
</ul>
</div>
EXAMPLE:
http://jsfiddle.net/#&togetherjs=vSgITe2BmT
Thanks !!
I just moved all definitions that give shape to the link from the a Tag to the li Tag and replaced the padding with margin.
Add this to your CSS:
.menu-blogsuperior li {
height:27px;
width:105px;
padding: 0 0px;
margin: 25px -59px;
margin-right: 27px;
background-image: url (boton-fondo-probar.png);
background-repeat:no-repeat;
background-position:center;
background-position:46px -1px;
background-size:69px 24px;
text-align: right;
text-align: right;
text-align: right;
text-align: right;
}
And adjust this definition in your CSS so it is exactly like mine:
.menu-blogsuperior li a {
text-decoration: none;
font-family: Helvetica, Arial, sans-serif;
font-weight: bold;
font-size: 14px;
color: #000000;
-webkit-transition: color .2s ease-in-out;
-moz-transition: color .2s ease-in-out;
-o-transition: color .2s ease-in-out;
-ms-transition: color .2s ease-in-out;
transition: color .2s ease-in-out;
}
Worked for me in the fiddle.
Related
I am trying to create a smooth animation of my nav-bar in CSS here's my HTML Code-
<body>
<nav class="navbar">
<ul class="nav-list another">
<li><n>Engine</n></li>
<li>Home</li>
<li>About</li>
<li>Contact Us</li>
<li><button type="button" id="mysearch">More</button></li>
</ul>
</nav>
<hr>
</body>
</html>
Here's my CSS Code-
*{
margin: 0;
padding: 0;
}
html{
background-color: white;
background-image: url("img/ManHattanImage.webp");
}
li{
align-items: left;
width: 100px;
height: 100%;
display: inline-block;
margin-right: 170px;
font-size: 20px;
/* background-color: black; */
color: black;
font-size: 20px;
}
hr{
color: black;
margin-top: 30px;
}
n{
/* background-color: black; */
color: white;
font-size: 40px;
font-style: bold;
font-family: "Lucida Console", "Courier New", monospace;
margin-left: 20px;
margin-top: 30px;
}
a {
text-decoration: none;
color: white;
}
a:visited { text-decoration: none; }
a:hover {
text-decoration: none;
/* background-color: black; */
}
a:focus { text-decoration: none; }
a:hover, a:active { text-decoration: none; }
nav:hover{
height:300px;
}
I want a clean Animation like of a good dropdown menu navbar and with clear overlaps, Also I may add some more elements inside the navbar (With Further Updates)?
This is how to make a dropdown menu but I'm not sure how to do an animation. I hope this is what you meant by the dropdown menu.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.dropbtn {
background-color: #ac0d0d;
color: white;
padding: 16px;
font-size: 16px;
border: none;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #ffffff;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: rgb(18, 19, 85);
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {background-color: #ddd;}
.dropdown:hover .dropdown-content {display: block;}
.dropdown:hover .dropbtn {background-color: #ac0d0d;}
</style>
</head>
<body>
<div class="dropdown">
<button class="dropbtn">Dropdown menu</button>
<div class="dropdown-content">
first
second
third
</div>
</div>
</body>
</html>
Animation Drop down menu on hover
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
nav {
width: 100%;
height: 80px;
background: #222;
}
ul {
text-align: center;
}
ul li {
font: 13px Verdana, 'Lucida Grande';
cursor: pointer;
-webkit-transition: padding .05s linear;
-moz-transition: padding .05s linear;
-ms-transition: padding .05s linear;
-o-transition: padding .05s linear;
transition: padding .05s linear;
}
ul li.drop {
position: relative;
}
ul > li {
display: inline-block;
}
ul li a {
line-height: 80px;
padding: 0 20px;
height: 80px;
color: #777;
-webkit-transition: all .1s ease-out;
-moz-transition: all .1s ease-out;
-ms-transition: all .1s ease-out;
-o-transition: all .1s ease-out;
transition: all .1s ease-out;
}
ul li a:hover {
color: #eee;
}
.dropOut .triangle {
width: 0;
height: 0;
position: absolute;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid white;
top: -8px;
left: 50%;
margin-left: -8px;
}
.dropdownContain {
width: 160px;
position: absolute;
z-index: 2;
left: 50%;
margin-left: -80px; /* half of width */
top: -400px;
}
.dropOut {
width: 160px;
background: white;
float: left;
position: relative;
margin-top: 0px;
opacity: 0;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 1px 6px rgba(0,0,0,.15);
-moz-box-shadow: 0 1px 6px rgba(0,0,0,.15);
box-shadow: 0 1px 6px rgba(0,0,0,.15);
-webkit-transition: all .1s ease-out;
-moz-transition: all .1s ease-out;
-ms-transition: all .1s ease-out;
-o-transition: all .1s ease-out;
transition: all .1s ease-out;
}
.dropOut ul {
float: left;
padding: 10px 0;
}
.dropOut ul li {
text-align: left;
float: left;
width: 125px;
padding: 12px 0 10px 15px;
margin: 0px 10px;
color: #777;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-transition: background .1s ease-out;
-moz-transition: background .1s ease-out;
-ms-transition: background .1s ease-out;
-o-transition: background .1s ease-out;
transition: background .1s ease-out;
}
.dropOut ul li:hover {
background: #f6f6f6;
}
ul li:hover a { color: white; }
ul li:hover .dropdownContain { top: 65px; }
ul li:hover .underline { border-bottom-color: #777; }
ul li:hover .dropOut { opacity: 1; margin-top: 8px; }
</style>
<body>
<nav>
<ul>
<li class="drop">
You
<div class="dropdownContain">
<div class="dropOut">
<div class="triangle"></div>
<ul>
<li>Plan</li>
<li>Account Settings</li>
<li>Switch Account</li>
<li>Sign Out</li>
</ul>
</div>
</div>
</li>
</ul>
</nav>
</body>
</html>
I have a fixed menu bar that contains a simple <ul> <li> menu system. Upon li:hover I have a sub-menu system aside appear, and this is relative to each li. Unfortunately this aside is always appearing on top of all of the parents.
When I actually want it to be positioned behind the div#sidebar. Is this possible? I have not had much luck with z-index (including -1), any help would be appreciated!
<div id="sidebar">
<nav class="secondary">
<h2>Featured</h2>
<ul>
<li>
<a href="#">
<h3>Title</h3>
</a>
<aside class="article-card">
<h4>TITLE</h4>
<h5>TEXT</h5>
</aside>
</li>
</ul>
</nav>
</div>
ul {
list-style: none;
display: inline-block;
width: 59.6%;
margin-right: 9.1%;
float: right;
margin-bottom: 40px;
}
li {
display: block;
margin-bottom: 10px;
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-ms-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
#sidebar {
background: #253e40;
color: #8b8c91;
width: 215px;
height: 100%;
position: fixed;
top: 0;
bottom: 0;
right: 215px;
margin-right: -215px; /* "#sidebar" width */
z-index: 3;
}
#sidebar.active { margin-right: 0; }
#sidebar header {
font-weight: bold;
padding: 30px 20px 50px 20px;
border-bottom: 1px solid #8b8c91;
color: #8b8c91;
}
#sidebar footer {
background: none;
bottom: 40px;
padding: 0 20px;
position: absolute;
}
/* Nav */
#sidebar nav {
width: 100%;
margin: 20px 0 50px 0;
display: inline-block;
}
#sidebar ul {
width: 100%;
margin: 0;
}
#sidebar li {
margin-bottom: 0;
padding: 2px 20px;
}
#sidebar li:before {
content: none;
padding: 0;
}
.current-menu-item {
font-weight: bold;
color: #fff;
}
#sidebar a:hover {
color: #fff;
}
#sidebar nav.secondary h2 {
font-weight: bold;
color: #fff;
padding: 0 20px 15px 20px;
border-bottom: 1px solid #8b8c91;
}
#sidebar nav.secondary li {
padding: 15px 20px;
border-bottom: 1px solid #8b8c91;
}
#sidebar nav.secondary li:hover {
background: #252f37;
color: #fff;
}
/* Article Card Popout */
.article-card {
position: absolute;
background-color: #44484f;
display: inline-block;
width: 200px;
height: auto;
right: 15px;
border-left: 5px solid #be572b;
}
#sidebar nav.secondary li:hover .article-card {
right: 215px;
}
.article-card h4 {
font-weight: bold;
padding: 10px;
}
.article-card h5 {
color: #fff;
padding: 10px;
}
/* Transition animations */
#sidebar,
.article-card {
-webkit-transition: all 0.7s ease-in-out;
-moz-transition: all 0.7s ease-in-out;
-ms-transition: all 0.7s ease-in-out;
-o-transition: all 0.7s ease-in-out;
transition: all 0.7s ease-in-out;
}
Fiddle
If you really want to keep that html, you need to create a new stacking context. #sidebar has position:fixed - elements inside sidebar are treated with a new stacking context that now begins at #sidebar and not at body level any more.
Children of the sidebar cannot be positioned below #sidebar.
To solve this add another container inside sidebar that contains all the background styling and is inside the same stacking context as your slideout.
ul {
list-style: none;
display: inline-block;
width: 59.6%;
margin-right: 9.1%;
float: right;
margin-bottom: 40px;
}
li {
display: block;
margin-bottom: 10px;
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-ms-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
#sidebar {
background: #253e40;
color: #8b8c91;
width: 215px;
height: 100%;
position: fixed;
top: 0;
bottom: 0;
right: 215px;
margin-right: -215px; /* "#sidebar" width */
z-index: 3;
}
#sidebar.active { margin-right: 0; }
.sidebar-content {
height: 100%;
background: #253e40;
}
#sidebar header {
font-weight: bold;
padding: 30px 20px 50px 20px;
border-bottom: 1px solid #8b8c91;
color: #8b8c91;
}
#sidebar footer {
background: none;
bottom: 40px;
padding: 0 20px;
position: absolute;
}
/* Nav */
#sidebar nav {
width: 100%;
margin: 20px 0 50px 0;
display: inline-block;
}
#sidebar ul {
width: 100%;
margin: 0;
}
#sidebar li {
margin-bottom: 0;
padding: 2px 20px;
}
#sidebar li:before {
content: none;
padding: 0;
}
.current-menu-item {
font-weight: bold;
color: #fff;
}
#sidebar a:hover {
color: #fff;
}
#sidebar nav.secondary h2 {
font-weight: bold;
color: #fff;
padding: 0 20px 15px 20px;
border-bottom: 1px solid #8b8c91;
}
#sidebar nav.secondary li {
padding: 15px 20px;
border-bottom: 1px solid #8b8c91;
}
#sidebar nav.secondary li:hover {
background: #252f37;
color: #fff;
}
/* Article Card Popout */
.article-card {
position: absolute;
z-index: -1; // z index put's it below .sidebar-content
background-color: #44484f;
display: inline-block;
width: 200px;
height: auto;
right: 15px;
border-left: 5px solid #be572b;
}
#sidebar nav.secondary li:hover .article-card {
right: 215px;
}
.article-card h4 {
font-weight: bold;
padding: 10px;
}
.article-card h5 {
color: #fff;
padding: 10px;
}
/* Transition animations */
#sidebar,
.article-card {
-webkit-transition: all 0.7s ease-in-out;
-moz-transition: all 0.7s ease-in-out;
-ms-transition: all 0.7s ease-in-out;
-o-transition: all 0.7s ease-in-out;
transition: all 0.7s ease-in-out;
}
<div id="sidebar">
<div class="sidebar-content">
<nav class="secondary">
<h2>Featured</h2>
<ul>
<a href="#">
<li>Title
<aside class="article-card">
<h4>TITLE</h4>
<h5>TEXT</h5>
</aside>
</li>
</a>
</ul>
</nav>
</div>
</div>
I'm trying to make the text on my nav bar grow in size on hover, I've managed to do this but when I do this the other text links move down slightly and push the others to the right (except the end one)
here's my code:
/* -----------------------------------------------------------------*/
html, body {
margin:0;
padding:0;
}
.header {
margin-top:-7px;
background-color:#333333;
height:70px;
}
.container {
max-width: 940px;
margin: 0 auto;
padding: 30px 10px;
}
.nav {
list-style-type: none;
margin: 0;
padding: 0px 0;
color:white;
}
.nav li {
color: #fff;
display: inline;
font-family: 'Raleway', sans-serif;
font-weight: 600;
font-size: 15px;
margin-right: 25px;
text-transform: uppercase;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
transition: all 0.5s ease;
}
/* NAV PROPERTIES */
.nav li:hover{
cursor: pointer;
font-size:18px;
text-shadow:0px 0px 5px white;
margin-top: 10px;
padding: 6px;
}
Define a line-height on .nav li
.nav li {
line-height: 10px;
}
https://jsfiddle.net/gnd6q0sp/1/
You are changing the size and margins of the list items...of course the other links move...that's what is supposed to happen.
One option is to just visually scale the list item using a transform instead.
.nav li:hover{
transform:scale(1.1);
cursor: pointer;
text-shadow:0px 0px 5px white;
}
JSfiddle Demo
Note: I am not recommending this option, I think there are better methods available to you.
So I added an animation to my navigation bar at repo.itechy21.com and its made the drop down text push to the right side of the drop down when I want it centred. The relevant CSS it attached below (along with HTML)
CSS:
/* Start nav bar*/
#header {
height: 100px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
#content {
margin-left: auto;
margin-right: auto;
padding: 20px;
text-align: center
}
#menu, #menu nav {
margin:0 auto;
padding:0;
position: center;
text-align: center
}
#menu {
display: inline-block;
list-style:none;
background-color: #98bf21;
border-radius: 10px;
text-align: center
}
#menu li {
float: left;
position: relative;
list-style: none;
text-align: center
}
#menu > li:hover > ul {
display:block;
background-color: #98bf21;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
visibility:visible;
opacity:1;
filter:alpha(opacity=100);
}
#menu > li > ul {
/*animation control*/
visibility: hidden;
opacity: 0;
filter:alpha(opacity=0);
-webkit-transition:.5s ease;
-moz-transition:.5s ease;
-o-transition:.5s ease;
transition:.5s ease;
position: relative;
}
#menu li a {
display: inline-block;
width: 120px;
font-weight: bold;
color: #FFFFFF;
text-align: center;
padding: 4px;
text-decoration: none;
text-transform: uppercase;
/*animation control*/
-o-transition:color .2s ease-out;
-ms-transition:color .2s ease-out;
-moz-transition:color .2s ease-out;
-webkit-transition:color .2s ease-out;
}
#menu li a:hover {
color: black;
-o-transition:color .5s ease-in;
-ms-transition:color .5s ease-in;
-moz-transition:color .5s ease-in;
-webkit-transition:color .5s ease-in;
}
/*End of nav bar css*/
HTML navbar layout (minus links):
<ul id="menu">
<li>Home</li>
<li>Modules
<ul>
<li>Remove Retina</li>
<li>Device Information</li>
<li>Syslogd Fixer</li>
</ul>
</li>
<li>Toolkit</li>
<li>Donate</li>
<li>Blog</li>
</ul>
Any suggestions on how to fix this and get the align back to what it used to be?
I hope this will help.
/* Start nav bar*/
#header {
height: 100px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
#content {
margin-left: auto;
margin-right: auto;
padding: 20px;
text-align: center
}
#menu, #menu nav {
margin:0 auto;
padding:0;
position: center;
text-align: center
}
#menu {
display: inline-block;
list-style:none;
height: auto;
width: auto;
background-color: #98bf21;
border-radius: 10px;
text-align: center;
-webkit-transition:.5s ease;
-moz-transition:.5s ease;
-o-transition:.5s ease;
transition:.5s ease;
}
#menu > li {
float: left;
position: relative;
display: inline-block;
width: 120px;
list-style: none;
text-align: center;
}
#menu ul > li {
display: block;
width: 100%;
list-style: none;
text-align: center;
}
#menu > li:hover > ul {
display:block;
background-color: #98bf21;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
visibility:visible;
opacity:1;
filter:alpha(opacity=100);
}
#menu > li > ul {
/*animation control*/
display:none;
width: 120px;
height: auto;
margin: 10px 0 0 0;
opacity: 0;
z-index: 10;
filter:alpha(opacity=0);
-webkit-transition:.5s ease;
-moz-transition:.5s ease;
-o-transition:.5s ease;
transition:.5s ease;
}
#menu li a {
font-weight: bold;
color: #FFFFFF;
text-align: center;
padding: 4px;
text-decoration: none;
text-transform: uppercase;
/*animation control*/
-o-transition:color .2s ease-out;
-ms-transition:color .2s ease-out;
-moz-transition:color .2s ease-out;
-webkit-transition:color .2s ease-out;
}
#menu li a:hover {
color: black;
-o-transition:color .5s ease-in;
-ms-transition:color .5s ease-in;
-moz-transition:color .5s ease-in;
-webkit-transition:color .5s ease-in;
}
/*End of nav bar css*/
I need to add an effect for my mobile where the menu is display smoothly when the navigation button is hovered.
what I need is that the menu should display with ease not sudden appearance and if its possible not to adjust the content of my site like overlapping the content above if plausible
CSS
.menuimg:hover + #navcontainer {
display: block;
height: auto;
}
#navcontainer:hover {
display: block;
height: auto;
}
.children {
display: none;
}
#navcontainer {
position: relative;
z-index: 1;
display: block;
float: none;
width: 100%;
height: 20px;
list-style: none;
text-align: center;
}
.menu {
display: inline-block;
float: left;
width: auto;
text-align: left;
}
#navcontainer ul {
overflow: hidden;
margin: 0;
padding: 0;
list-style-type: none;
text-align: left;
}
#navcontainer ul li {
display: block;
float: left;
margin-left: 0;
padding: 0 6px;
}
#navcontainer ul li a {
display: block;
width: 100%;
padding: .2em 1em;
text-decoration: none;
color: #694a31;
border-top: 1px solid transparent;
border-right: 1px solid transparent;
border-left: 1px solid transparent;
background-color: transparent;
}
#navcontainer ul li ul li {
display: block;
float: none;
width: auto;
margin-left: 0;
border-top: 1px solid #e3d7be;
background: #edebd7;
}
#navcontainer ul li ul li a {
opacity: 1 !important;
color: #724e32;
border-top: 0 !important;
border-right: 0 !important;
border-left: 0 !important;
-webkit-border-radius: 0 0 0 0 !important;
-moz-border-radius: 0 0 0 0 !important;
border-radius: 0 0 0 0 !important;
background: transparent !important;
background-color: transparent !important;
}
#navcontainer li:hover ul,
#navcontainer li:active ul {
display: block;
}
#navcontainer ul li:hover a {
opacity: .5;
color: #724e32;
border-top: 1px solid #694b0a;
border-right: 1px solid #694b0a;
border-left: 1px solid #694b0a;
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
background-color: #edebd7;
}
#navcontainer ul li a:hover {
color: #fff;
background-color: #d3c096;
}
#navcontainer li:hover ul.children,
#navcontainer li:active ul.children {
position: absolute;
z-index: 300;
top: auto;
overflow: visible;
width: auto;
height: auto;
padding: 5px;
white-space: nowrap;
color: #724e32;
border-right: 1px solid #694b0a;
border-bottom: 1px solid #694b0a;
border-left: 1px solid #694b0a;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
background: #edebd7;
}
#navcontainer ul li ul li:hover {
margin-left: 0;
color: #fff;
background-color: #d3c096;
}
#navcontainer ul li ul li a:hover {
margin-left: 0;
color: #fff;
background-color: #d3c096;
}
#navcontainer ul li ul li:hover a {
color: #fff;
background-color: transparent;
}
I want is to appear my menu at easy like from fading transition when i hovered on the navigation button
http://prntscr.com/4yverw
i have tested my css on fiddle its working fine there but when i transfer it to my site the menu transition doesn't work change and addeds some
.menu { display:none > opacity:0
-webkit-transition: opacity 0.5s ease-in-out;
-moz-transition: opacity 0.5s ease-in-out;
-o-transition: opacity 0.5s ease-in-out;
-ms-transition: opacity 0.5s ease-in-out;
transition: opacity 0.5s ease-in-out;}
.menuimg:hover + .menu
{
display: block; height: auto; opacity: 1;
-webkit-transition: opacity 0.5s ease-in-out;
-moz-transition: opacity 0.5s ease-in-out;
-o-transition: opacity 0.5s ease-in-out;
-ms-transition: opacity 0.5s ease-in-out;
transition: opacity 0.5s ease-in-out;
}.menu:hover
{
opacity: 1;
-webkit-transition: opacity 0.5s ease-in-out;
-moz-transition: opacity 0.5s ease-in-out;
-o-transition: opacity 0.5s ease-in-out;
-ms-transition: opacity 0.5s ease-in-out;
transition: opacity 0.5s ease-in-out; display: block; height: auto;
}
http://jsfiddle.net/xeqcx1zL/1/ - workign trasition
i changed the code
original code
.menuimg:hover + #navcontainer
#navcontainer:hover
to this
.menuimg:hover + .menu
.menu:hover
I have now my transition menu the only problem is that since i remove the display:none; the menu is always their but you cant see it since its on opacity:0; i want to hide it so it doesnt eats a space on my site, but using the display none and block css the transition wont work.
the menu is displayed under the button but you cant see it. it should be activated if you hover your mouse on the button.
http://prntscr.com/4z4jah