CSS Library: Links & Buttons: Here
Bold CSS Buttons
Author: Dynamic Drive
These big, bold CSS buttons are constructed using a rounded edge button image sliced into two pieces, then put back together using CSS. The button text style reacts on the "hover" state.
Demo:
Single button:
Side by Side:
The images used: Choose the desired set to download (2 images total):
Gray oval (2 images):
Blue oval (2 images):
Green button (2 images):
Red button (2 images):
Metallic brown button (2 images):
The CSS:
Got a question or need help customizing this CSS code? Post it in the CSS Forums. If you have a comment or suggestion instead, post it in the comments section below.
Comment Pages 1 of 7 pages 1 2 3 > Last »
How should I use this menu on my blog/website
Thanks for the heads up Lior, HTML code fixed.
Quite nice, but I think it would be better if the two images were actually two buttons one above the other so the colour of the button could change when you hover instead of just a text effect.
i agreen with Richard Winskill hohh
Can anyone tell me how I can use this button in a <form> instead of the button generated by "<input type="submit" name="submit" value="Donate" />" ?
I've got a form action going to a URL via POST so I don't think I need the href on the button itself. But I don't know how to hook the CSS button to the form itself.
Thanks in advance...
I've got a form action going to a URL via POST so I don't think I need the href on the button itself. But I don't know how to hook the CSS button to the form itself.
Thanks in advance...
This is what I came up with to change the color when someone mouses over. Don't be too critical as I'm new to CSS
a.boldbuttons{
background: transparent url(images/roundedge-gray-left.gif) no-repeat top left;
display: block;
float: left;
font: bold 13px Arial; /* Change 13px as desired */
line-height: 22px; /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 30px) */
height: 30px; /* Height of button background height */
padding-left: 8px; /* Width of left menu image */
text-decoration: none;
}
a:link.boldbuttons, a:visited.boldbuttons {
color: white; /*button text color*/
}
a:hover.boldbuttons, a:active.boldbuttons {
background: transparent url(images/roundedge-red-left.gif) no-repeat top left;
display: block;
float: left;
font: bold 13px Arial; /* Change 13px as desired */
line-height: 22px; /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 30px) */
height: 30px; /* Height of button background height */
padding-left: 8px; /* Width of left menu image */
text-decoration: none;
}
a:hover.boldbuttons span, a:active.boldbuttons span {
background: transparent url(images/roundedge-red-right.gif) no-repeat top right;
display: block;
padding: 4px 10px 4px 2px; /*Set 10px to be equal or greater than'padding-left' value above*/
}
a.boldbuttons span{
background: transparent url(images/roundedge-gray-right.gif) no-repeat top right;
display: block;
padding: 4px 10px 4px 2px; /*Set 10px to be equal or greater than'padding-left' value above*/
}
a:hover.boldbuttons{ /* Hover state CSS */
text-decoration: underline;
}
.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%;
}
And in response I had to use javascript to use it for a form, not sure if that's an option for you but the code I used is as follows:
hope it helps.
<script language="JavaScript">
function submitform()
{
document.formname.submit();
}
</script>
<a class="boldbuttons" href="javascript: submitform()"><span>Search Items</span></a>
hope it helps.
Did someone notice the nosie flicker with IE?
how can i can i center this one? sorry im just a noob in HTML
Commenting is not available in this weblog entry.


in the css you declare it as 'boldbuttons' and after that in the implementation (html) code you refer to 'ovalbuttons', i didnt understand why it doesnt work until i saw there is a mis-match between the CSS and the HTML.