marmite Posted May 2, 2007 Share Posted May 2, 2007 So, everyone is trying to do the opposite (to get their submits to look like regular links), and this is all I find on Google. I'm sure this is really easy. I have an <a href which doesn't need to POST any information... but as I have another submit on the page it looks silly to have this as a link or an image. I'd like it to look like a button. It falls over when I simply try to add a form in with no inputs except the submit. Thanks ??? Quote Link to comment Share on other sites More sharing options...
obsidian Posted May 2, 2007 Share Posted May 2, 2007 Well, you're not going to get the link to look exactly like the submit buttons unless you style both of them a tad. The default button look is nigh impossible to duplicate on non-button elements, but with a little tweaking, we can get close. Let's say you've got an <a> tag with a class of "pseudo_button" on it. Here is the CSS I would recommend you start with in order to begin your quest: a.pseudo_button { text-decoration: none; background-color: #F4FAFA; padding: 2px 10px; border: 1px solid #2D5082; cursor: arrow; color: #000000; font-size: 11px; } This may be a good start, and then you can do whatever you need to modify it from there. Good luck! Quote Link to comment Share on other sites More sharing options...
marmite Posted May 2, 2007 Author Share Posted May 2, 2007 Thanks! (I am surprised: I thought it would be really easy to insert a submit button as an <a href... rather than trying to format my image/link to look like that) You've saved me lots of time. Cheers! Quote Link to comment Share on other sites More sharing options...
obsidian Posted May 2, 2007 Share Posted May 2, 2007 (I am surprised: I thought it would be really easy to insert a submit button as an <a href... rather than trying to format my image/link to look like that) You could always use some javascript to tell a button to act like a link instead: <input type="submit" value="myLink" onclick="window.location('newpage.html'); return false;" /> The only consideration is that a redirect like this requires javascript, and some people don't like requiring users to have it enabled. This would definitely be easier and a little more accurate, though, since you are using a submit button for the redirect. Quote Link to comment Share on other sites More sharing options...
marmite Posted May 2, 2007 Author Share Posted May 2, 2007 Hey thanks for that Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.