Search This Blog

Saturday, August 21, 2010

greadient button over effect

.grad_button  {
color: #000; width: 145px; height: 30px;
border: solid 1px #999; text-align:center; padding: 5px 0px 0px 0px; margin: 10px 0px 0px 160px; cursor: pointer; font-family:Arial, Helvetica, sans-serif; font-size: 16px; text-decoration:none; font-weight:bold;
background: #f78d1d;
background: -webkit-gradient(linear, left top, left bottom, from(#f1f1f1), to(#dfdfdf));
background: -moz-linear-gradient(top, #f1f1f1, #dfdfdf);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f1f1f1', endColorstr='#dfdfdf');
}
.grad_button  a {
color: #fef4e9; width: 145px; height: 30px;
border: solid 1px #999; text-align:center; padding: 5px 0px 0px 0px; cursor: pointer; text-decoration:none;
background: #f78d1d;
background: -webkit-gradient(linear, left top, left bottom, from(#f1f1f1), to(#dfdfdf));
background: -moz-linear-gradient(top, #f1f1f1, #dfdfdf);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f1f1f1', endColorstr='#dfdfdf');
}
.grad_button:hover {
background: #f47c20; color: #fff;
background: -webkit-gradient(linear, left top, left bottom, from(#59cbe5), to(#3ab3d1));
background: -moz-linear-gradient(top, #59cbe5, #3ab3d1);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#59cbe5', endColorstr='#3ab3d1');
}

Button over Effect

#pillmenu ul {
    float:right;
    padding:0;
    margin:0;
    list-style: none;
}

#pillmenu li {
    float: left;
    margin:0 0 0 4px; list-style: none;
}

#pillmenu li a {
    float:left;
    cursor:pointer; text-decoration:none;
    background: transparent url(images/t_menu_btn.png) no-repeat top right;
}

#pillmenu li a span {
    float:left;
    color: #444;
    font-size:11px;
    font-weight:700;
    font-family: Arial, Verdana, Tahoma, sans-serif;
    text-decoration: none;
    text-transform:uppercase;
    text-shadow:1px 1px #dbdbdb;
    height:50px;
    line-height:26px;
    padding: 0 10px;
    margin:0;
    background: transparent url(images/t_menu_btn_l.png) no-repeat top left;
}

#pillmenu li a:hover,#pillmenu li#current a{
    text-decoration: none;
    background: transparent url(images/t_menu_btn.png) no-repeat bottom right;
}

#pillmenu li a:hover span,#pillmenu li#current a span {
    color:#fff;
    text-shadow:none;
    background: transparent url(images/t_menu_btn_l.png) no-repeat bottom left;
}

And Put This code to your HTML DIV

<div id="pillmenu"> <li><a href="#"><span>nirav panchal</span></a></li></div>

CSS 3 working in all Browser

.inset {background: transparent; width:40%;}
.inset h1, .inset p {margin:0 10px;}
.inset h1 {font-size:2em; color:#fff;}
.inset p {padding-bottom:0.5em;}

.inset .b1, .inset .b2, .inset .b3, .inset .b4, .inset .b1b, .inset .b2b, .inset .b3b, .inset .b4b {display:block; overflow:hidden; font-size:1px;}
.inset .b1, .inset .b2, .inset .b3, .inset .b1b, .inset .b2b, .inset .b3b {height:1px;}
.inset .b2 {background:#ccc; border-left:1px solid #999; border-right:1px solid #aaa;}
.inset .b3 {background:#ccc; border-left:1px solid #999; border-right:1px solid #ddd;}
.inset .b4 {background:#ccc; border-left:1px solid #999; border-right:1px solid #eee;}
.inset .b4b {background:#ccc; border-left:1px solid #aaa; border-right:1px solid #fff;}
.inset .b3b {background:#ccc; border-left:1px solid #ddd; border-right:1px solid #fff;}
.inset .b2b {background:#ccc; border-left:1px solid #eee; border-right:1px solid #fff;}


.inset .b1 {margin:0 5px; background:#999;}
.inset .b2, .inset .b2b {margin:0 3px; border-width:0 2px;}
.inset .b3, .inset .b3b {margin:0 2px;}
.inset .b4, .inset .b4b {height:2px; margin:0 1px;}
.inset .b1b {margin:0 5px; background:#fff;}

.inset .boxcontent {display:block; background:#ccc; border-left:1px solid #999; border-right:1px solid #fff;}


/* HTML Code */

<div class="inset">
<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
<div class="boxcontent">
<h1>Inset Borders</h1>
<p>Rounded corners with </p>
</div>
<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
</div>