how to add hover effect to button using css
Tags: html,css
Problem :
i'm trying to add hover effect to my menu.This is my html
<div class="nav-top-menu nav-top">
<span class="menu-icons">
<button class="menu-button hoverEfect">
<i class="fa fa-cog fa-2x"></i>
<span class="menu-icons-text" id="userName">Enhanzer(pvt)ltd</span>
</button>
</span>
</div>
i just want to change color when mouse over.This is css that i tried
.nav-top-menu .hoverEfect button:hover
{
color: #65b4d7;
}
can anyone help me to do this. i don't want to use javascript or jquery
Solution :
Change this:
.nav-top-menu .hoverEfect button:hover
To this:
.nav-top-menu .hoverEfect:hover
As .hoverEffect
is itself a button
You may also use:
.nav-top-menu button.hoverEfect:hover
{
color: #65b4d7;
}
CSS Howto..
a:hover+h2 will work in CSS[1]. Using it directly as a jQuery selector will work, but might be cumbersome just to apply styles. Here's how I might do it if I...
This is because of the following code: Mi cuenta <span class="caret"></span> <!--------^^^^------------------^^^^^^^^-----^^^^ The < will be interpreted as < and the > will be interpreted as >. Please make sure...
If you really want to do this you can try something like this: .overlay { height: 400px; .categoryHero & { height: 200px; } } The trailing ampersand will select the...
Place your image inside the centered div. Give the centered div position:relative. Now give the image position:absolute and left:-XXpx where XX is the width of your image.
I believe you need specify which animation gets called. Try adding this to your animated class: .animated { -webkit-animation-name: wobble; -moz-animation-name: wobble; -o-animation-name: wobble; animation-name: wobble; } Wobble isn't a...
window.onload = function(){ document.getElementById('your_div_id').style.display = 'none'; } http://jsfiddle.net/nXvF5/ Or, in jQuery: $(document).ready(function(){ $('#your_div_id_or_other_selector').hide(); }); http://jsfiddle.net/nXvF5/1/...
I added text-center class to align the menu items to center. Added display:block to menu item. Check static code here. #logosignin img { width: 250px; height: auto; margin: 0 auto;...
If you've added a custom style to the figure (you mentioned a .pax class), then you simply need to specify the following in the CSS: .figure.pax{ display:inherit; } If that...
Maybe something like this: $('.someclass').each(function(index, value) { $(this).css({ 'top': (index * 10) + 'px', 'bottom': 0, 'padding': 0 }); }); ...
Due to the way that you have your CSS written, you will want to change the following rule in your css file: #nav li:hover li:hover ul, #nav li:hover li:hover li:hover...
I modified your fiddle. Here is a jQuery solution. http://jsfiddle.net/hCVjK/3/ $('ul.sub-level').css('display', 'none'); $('ul.top-level > li').hover(function(){ $(this).find('> ul').show(); }, function(e){ var t = e.relatedTarget.nodeName; if(t === 'LI' || t === 'A'){...
Giving class label margin seems to help: span.label { float: right; margin: 10px; } ...
for clock: float: left; for adress: float: right; but if the browser window gets too small they will appear under each other again...
Try putting a <div> around with the following CSS attributes: overflow: hidden; left: 0; top: 0; position: absolute; z-index: -9999; ...
You have an error near your addClass, you should put $("#d1").addClass("spinEffect"); and not ".spinEffect", the . is useless there ;) For your second question, just add infinite in your css...
You absolutely can do this with just HTML and CSS...using labels to check alternate radio input elements, the checked state of which is then use to determine the adjacent div...
Stephen, Two changes are required to get your desired result. First, set .navbar-brand padding right to 70px or what you needed. .navbar-brand { padding-right:70px; } And second, make .navbar-toggle position:absolute,...
menu-item is an class? then prefix it with an dot .menu-item or if its a ID then prefix it with an # #menu-item
Try this (using Pseudo-elements): CSS #arrowbox { width: 200px; height: 50px; background-color:green; margin-left:100px; margin-top:100px; position: relative; } #arrowbox:after { left: 100%; top: 50%; border: solid transparent; content: " "; height:...
I was able to finally create it. I really hope this helps someone out. HTML: <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="taco.css"> <title>Test Page</title> </head> <nav> <header><h1>Test Site</h1></header> <div...
As far as I am aware, there is no true way to achieve horizontal and vertical alignment without a table. (I was just proven wrong by @TimMedora) However, if...
You shall use a relative border-radius, and set it to 50% to have a perfect oval. Then, you could try with skew instead : .circle{ -webkit-transform: skew(27deg); } Will render...
It is happening because your css is only for the th tag. You should add css for td as well: #mytbody > tr > th, #mytbody > tr > td...
Try with: #wrapper .wrapperInput input { width: auto; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } ...
I'd just put a container inside the body and set that to overflow:hidden; Keep the rotated square within the container div. Keep the width of the container at whatever you...
SCSS is a preprocessor language. That means it will be converted to CSS. The SCSS files do not get loaded by the website. Instead you will have to make your...
Thank you for your answers guys but i got my solution. This my solution. wv.loadUrl("javascript:(function() { " + "var divs = document.getElementsByClassName('free');"+ "for(var i=0; i<divs.length; i++)"+ "{"+ "divs[i].style.backgroundImage='-webkit-gradient(linear, left bottom,...
tr:hover > td { display:inline; } This is assuming whatever you're hiding is hidden with display:none;. Just use whichever property is appropriate for your situation. EDIT: I changed it to...
You can use attribute starts with selector like following. var colors = ["#42ae18", "#eabc00", "#147cc4", "#FF6EB4", "#ed4329", "#8d33aa", "#00b971", "#e9681b", "#a2b3d4", "#0b863c", "#eabc00", "#7027a5", "#c83131", "#00a1de", "#0bc1b6", "#FF6EB4", "#10a0b6", "#FF6EB4",...
remove the float declaration, and add top:0; right:0; ...