HestonJames
Programmer
Hello Guys,
I'm looking for a little help styling a button element on a form, something like this:
Now, I want the button to look like this:
Now, the button is of no fixed width as I want this to be a general style so I can add any old text into the button and it'll scale nicely, the height however can be fixed, I'm not worried about that.
So, I thought I would start by splicing the images up like this:
This should give me the stuff I need to get the button so it scales nicely.
Can anyone suggest the CSS and HTML mods I'll need to get this button looking right? I'm guessing I'll need to add some <span> or something into the button element to create the sliding doors style background effect and make the button look complete.
My best efforts so far look like this:
This almost works but it creates a funny kink in the button where the images dont quite match up properly, like so:
Thanks guys, I appreciate any advice.
Heston
I'm looking for a little help styling a button element on a form, something like this:
Code:
<button type="submit" name="submit" id="SendEnquiry" accesskey="s">
<em>s</em>end my message!
</button>
Now, I want the button to look like this:
Now, the button is of no fixed width as I want this to be a general style so I can add any old text into the button and it'll scale nicely, the height however can be fixed, I'm not worried about that.
So, I thought I would start by splicing the images up like this:
This should give me the stuff I need to get the button so it scales nicely.
Can anyone suggest the CSS and HTML mods I'll need to get this button looking right? I'm guessing I'll need to add some <span> or something into the button element to create the sliding doors style background effect and make the button look complete.
My best efforts so far look like this:
Code:
<button type="submit" name="submit" id="SendEnquiry" accesskey="s">
<div>
<em>s</em>end my message!
</div>
</button>
button {
border:none;
padding:0 24px 0 0;
background:url('../images/blue_button_right.png') top right no-repeat;
}
button div {
padding:17px 0 17px 24px;
font-size:22px;
color:#fff;
background:url('../images/blue_button_left.png') top left no-repeat;
}
This almost works but it creates a funny kink in the button where the images dont quite match up properly, like so:
Thanks guys, I appreciate any advice.
Heston