Dragos
07-16-2008, 08:19 PM
hi guys,
I found somewhere this css and I adapted so it will render a round corners button by using a div, an anchor and a span element.
in order to get the 3d look, the anchor uses "bgbutton.gif" as a background image, tiled horizontally.
html code:
<div class="button">
<a href="#"><span>caption</span></a>
</div>
css:
div.button{
float:left;
}
div.button a {
display:block;
position:relative;
border-width:1px 0;
border-color:#ccc;
border-style:solid;
color:#555;
text-decoration:none;
margin:4px 1px;
background-image: url(bgbutton.gif);
background-repeat: repeat-x;
background-position: left center;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
letter-spacing:0px;
}
div.button a span {
display:block;
position:relative;
margin:0 -1px;
border-width:0 1px;
border-color:#ccc;
border-style:solid;
padding:3px 8px;
}
div.button a:hover {
border-color:#aaa;
color:#333;
}
div.button a:hover span {
border-color:#aaa;
}
image file:
http://www.webfixtech.com/repository/cssbutton/bgbutton.gif
it should look like this: http://www.webfixtech.com/repository/cssbutton/
enjoy and good luck!
I found somewhere this css and I adapted so it will render a round corners button by using a div, an anchor and a span element.
in order to get the 3d look, the anchor uses "bgbutton.gif" as a background image, tiled horizontally.
html code:
<div class="button">
<a href="#"><span>caption</span></a>
</div>
css:
div.button{
float:left;
}
div.button a {
display:block;
position:relative;
border-width:1px 0;
border-color:#ccc;
border-style:solid;
color:#555;
text-decoration:none;
margin:4px 1px;
background-image: url(bgbutton.gif);
background-repeat: repeat-x;
background-position: left center;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
letter-spacing:0px;
}
div.button a span {
display:block;
position:relative;
margin:0 -1px;
border-width:0 1px;
border-color:#ccc;
border-style:solid;
padding:3px 8px;
}
div.button a:hover {
border-color:#aaa;
color:#333;
}
div.button a:hover span {
border-color:#aaa;
}
image file:
http://www.webfixtech.com/repository/cssbutton/bgbutton.gif
it should look like this: http://www.webfixtech.com/repository/cssbutton/
enjoy and good luck!