Log in

View Full Version : form submit button help



viktor
12-09-2008, 03:46 AM
Hey guys,

Need some quick help with submit button.
I have simple ajax and php mail form, which uses post action.

Right now I have this as my submit button:

<input class="submit" type="submit" name="sendContactEmail" id="sendContactEmail" value=" Send Email " />

I want to style it as a normal link to look like a button.

<a class="Button" href="#"> <span class="btn">
<span class="t">Read&nbsp;more...</span> <span
class="r"><span></span></span> <span
class="l"></span> </span> </a>


How can I make it into submit button?

Thanks,
viktor

Schmoopy
12-09-2008, 04:05 AM
You can't really make it look exactly like that, well, maybe with a few background images, but why do you want it to be a link if you just want a button.

Here is some CSS to get you started anyway (just to start you off this will make a rectangular button that is dark and turns light grey on rollover):



<html>
<head>
<title>Example Page</title>
<style>
.Button{
background-color:#111;
padding:5px;
text-decoration:none;
color:#FFFFFF;
font-family:verdana;
border:2px solid #000;
}

.Button:hover{
background-color:#666;
}
</style>
</head>

<body>

<input class="submit" type="submit" name="sendContactEmail" id="sendContactEmail" value=" Send Email " />

<a class="Button" href="#">Read more...</a>
</body>

</html>


Of course, with just CSS the button doesn't look very good, but if you get a background image of a button you want you can make it look a lot better.

Hope this sets you on the right track though,

Jack