Membuat Tombol Oval dengan CSS
Contoh:
Single button:
Side by Side:
Single button:
Side by Side:
Cara Memasang CSS Oval buttons
- Langkah Pertama:
<style type="text/css">
/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */
a.ovalbutton{
background: transparent url('http://img163.imageshack.us/img163/1150/ovalredleft.gif') no-repeat top left;
display: block;
float: left;
font: normal 13px Tahoma; /* Change 13px as desired */
line-height: 16px; /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 24px) */
height: 24px; /* Height of button background height */
padding-left: 11px; /* Width of left menu image */
text-decoration: none;
}
a:link.ovalbutton, a:visited.ovalbutton, a:active.ovalbutton{
color: #494949; /*button text color*/
}
a.ovalbutton span{
background: transparent url('http://img849.imageshack.us/img849/4858/ovalredright.gif') no-repeat top right;
display: block;
padding: 4px 11px 4px 0; /*Set 11px below to match value of 'padding-left' value above*/
}
a.ovalbutton:hover{ /* Hover state CSS */
background-position: bottom left;
}
a.ovalbutton:hover span{ /* Hover state CSS */
background-position: bottom right;
color: black;
}
.buttonwrapper{ /* Container you can use to surround a CSS button to clear float */
overflow: hidden; /*See: http://www.quirksmode.org/css/clearing.html */
width: 100%;
}
</style>
- Langkah Kedua:
<h4>Single button:</h4>
<div class="buttonwrapper">
<a class="ovalbutton" href="http://www.dynamicdrive.com/style/"><span>Buku Catatan si Ugi</span></a>
</div>
<h4>Side by Side:</h4>
<div class="buttonwrapper">
<a class="ovalbutton" href="#"><span>Berbagi</span></a> <a class="ovalbutton" href="#" style="margin-left: 6px"><span>Inspirasi</span></a>
</div>
sumber: dynamicdrive
0 komentar:
Post a Comment
Catatan :
Untuk menyisipkan gambar kedalam komentar, gunakan tag : [img]URL_Gambar[/img]
atau <i rel="image">URL_Gambar</i>
Untuk Video Youtube : [youtube]URL_Video[/youtube]
atau <i rel="youtube">URL_Video</i>
Untuk "Kutipan", gunakan : [blockquote]Kutipan_Anda[/blockquote]
atau <b rel="quote">Kutipan_Anda</b>
Untuk menyisipkan Kode: [code]KODE[/code]
atau <i rel="code">KODE</i>
atau <i rel="pre">KODE</i>
Dan untuk menyisipkan smiles/ emoticon, lihat kode Emoticon