I have made the hover button already on my Contact Us page, making these types of buttons are easy today because of CSS3, when we hover on the button it expands. And that make's the button look very cool, one of my friend saw the button on my Contact Page, and asked me how to make that so I am writing a post on 'How to make professional looking hover effect buttons'.
First we have to make a HTML DIV element,because I am making a single button (in my contact page i have used li property, because there was more than one button.) Below is the HTML code of the button. The HTML code is small, because all the designs will be made with CSS and CSS3.
<div class="testbutton">
<a class="hupt" href="YOUR-URL">FB
</div></a>
<a class="hupt" href="YOUR-URL">FB
</div></a>
TIP: You can give your own class="YOUR CLASS" , according to your use. You can try this code by pasting this code in notepad. Click to know how to save an HTML page with CSS link in it.
You may paste the HTML code directly into your blog any where in the HTML template code or in blog-post. Now we will define the CSS design for the class="hupt". 'Hupt' is nothing more than a unique name used to define in CSS where to put that style, so if you wish you can put any name in place of 'HUPT', but remeber you have to change the code also in CSS. See and learn more in this code. This is the CSS code, main thing to make an hover effect.
a.hupt:link {
color: #6E6E6E;
font: bold 12px Helvetica, Arial, sans-serif;
text-decoration: none;
padding: 7px 12px;
position: relative;
display: inline-block;
text-shadow: 0 1px 0 white;
-webkit-transition: border-color .218s;
-moz-transition: border .218s;
-o-transition: border-color .218s;
transition: border-color .218s;
background: #F3F3F3;
background: -webkit-gradient(linear,0% 40%,0% 70%,from(whiteSmoke),to(#F1F1F1));
background: -moz-linear-gradient(linear,0% 40%,0% 70%,from(whiteSmoke),to(#F1F1F1));
border: solid 1px gainsboro;
border-radius: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
margin-right: 10px;
text-align: center;
width: 70px;
transition: width 1s;
-moz-transition: width 1s;
-webkit-transition: width 1s;
-o-transition: width 1s;
}
To make a Good hover effect, like it's animation, the 'transition' property is the most important. Without the transition property the button will look like this.
a.hupt:hover {
color: #333;
border-color: #999;
-moz-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2) -webkit-box-shadow:0 2px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
width: 160px;
}
Sweet you also pasted the hover effect code in your CSS ( Know how to create a CSS file and HTML work together) but if you have blogger you can paste these CSS code by going to Blogger Dashboard >> Template >> Customize >> Advanced Tab >> Add CSS.
Add the CSS codes in here, and then copy paste the HTML code any where in your blog or website.
Now the output will be great, If you have done all the copy paste well. See and button below.