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 6 of 7 pages « First < 4 5 6 7 >
fd dfff fff fee fds
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
I think your CSS won't work well for IE
Given the HTML in IE on HOVER the hover font, line height and padding won't be what is desired.
I believe you need something like this :
Given the HTML in IE on HOVER the hover font, line height and padding won't be what is desired.
I believe you need something like this :
a:hover.boldbuttons span{
font: bold 13px Arial; /* Change 13px as desired */
text-decoration: underline;
background: transparent url('images/roundedge-gray-right.gif') no-repeat top right;
display: block;
line-height: 22px; /* This value + 4px + 4px (top and bottom padding of SPAN) must equal height of button background (default is 30px) */
padding: 4px 10px 4px 2px; /*Set 10px to be equal or greater than'padding-left' value above*/
}
Also we might want to consider the a.visited for IE:
a:visited.boldbuttons{
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) */
padding-left: 8px; /* Width of left menu image */
}
How could I make this work with IE6 and earlier?
Thanks
Thanks
Thanks for this sleek, clean button!
I recently used these bold CSS buttons on a website that I am developing for a friend. When accessing the site from certain places, the images behind the button take an observable time to download, resulting in a noticeable white screen between image swaps. I came back to this page to test if it was just my site or if I could reproduce here. Sure enough, the same problem occurs. Furthermore, no other CSS image swapping buttons seem to have this effect. ...just an FYI for those considering to use.
it is many thanks
bcvb
Good script. If you change the a.boldbuttons span padding from:
To
It removes the 1px line gap between the two images on Firefox.
padding:4px 10px 4px 2px;To
padding:4px 11px 4px 2px;It removes the 1px line gap between the two images on Firefox.









