Here's an example I mocked up for you that can use a gradient border - I've made it wide enough to display. It could all be done in one image, but then you would need a different width image for each button...
http://www3.sympatico.ca/s
And the code:
<html>
<head>
<title></title>
<style type="text/css">
/* we need a containing div to hold the border image*/
div.border {
background-image: url(border.gif);
background-repeat:repeat-x
width:10px; /* set a width to constrain div size */
height:28px;
}
button {
margin:4px;
background-image: url(gradient.gif);
border:none;
background-repeat:repeat-x
height:20px;
font-size:9px;
font-family:arial,sans serif;
}
</style>
</head>
<body>
<form>
<div class="border"><button>Sma
<div class="border"><button>Med
<div class="border"><button>A rather large one</button></div>
</form>
</body>
</html>
Main Topics
Browse All Topics





by: seanpowellPosted on 2004-02-02 at 17:54:52ID: 10257816
I would suggest just using a gradient image with the css background-repeat style to achieve the effect.
; width:45px; height:20px; font-size:9px; font-family:arial, sans serif; border:1px solid #f00;}
Note the revised style:
<html>
<head>
<title></title>
<style type="text/css">
button { background-image: url(gradient.gif); background-repeat:repeat-x
</style>
</head>
<body>
<form>
<button>Invite</button>
</form>
</body>
</html>
If your image uses a vertical gradient, the repeat is "x". And vice versa.
The border, unless it's really thick, should be a solid color. The gradient would be practically invisible at a normal border size.