• 0

css3 Styled Button Clickable


Question

Here is the css:

button.css3button {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	color: #ffffff;
	padding: 10px 20px;
	background: -moz-linear-gradient(
		top,
		#0056ab 0%,
		#003c75);
	background: -webkit-gradient(
		linear, left top, left bottom, 
		from(#0056ab),
		to(#003c75));
	-moz-border-radius: 30px;
	-webkit-border-radius: 30px;
	border-radius: 30px;
	border: 2px solid #000000;
	-moz-box-shadow:
		0px 1px 3px rgba(000,000,000,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.3);
	-webkit-box-shadow:
		0px 1px 3px rgba(000,000,000,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.3);
	box-shadow:
		0px 1px 3px rgba(000,000,000,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.3);
	text-shadow:
		0px -1px 0px rgba(000,000,000,0.4),
		0px 0px 0px rgba(255,255,255,0);
}

And the button code I am trying to make clickable.  If I make it a form, it loses the formatting.  If I do an onclick, same thing.  I am trying to get this into a widget in Wordpress (text Widget)

<center><button type="button" name="http://www.example.com/order.php" value="http://www.example.com/order.php" class="css3button">Order Now</button></center>
Link to comment
https://www.neowin.net/forum/topic/1159684-css3-styled-button-clickable/
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Not sure why you are using a button. You could just use an anchor tag or change it to a submit input inside a form and also change the cursor property so that people know it is clickable.

<form action="http://www.example.com/order.php">
    <input type="submit" value="Order now" class="css3button">
</form>

	<style type="text/css">
	input.css3button {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	color: #ffffff;
	padding: 10px 20px;
	background: -moz-linear-gradient(
		top,
		#0056ab 0%,
		#003c75);
	background: -webkit-gradient(
		linear, left top, left bottom, 
		from(#0056ab),
		to(#003c75));
	-moz-border-radius: 30px;
	-webkit-border-radius: 30px;
	border-radius: 30px;
	border: 2px solid #000000;
	-moz-box-shadow:
		0px 1px 3px rgba(000,000,000,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.3);
	-webkit-box-shadow:
		0px 1px 3px rgba(000,000,000,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.3);
	box-shadow:
		0px 1px 3px rgba(000,000,000,0.5),
		inset 0px 0px 1px rgba(255,255,255,0.3);
	text-shadow:
		0px -1px 0px rgba(000,000,000,0.4),
		0px 0px 0px rgba(255,255,255,0);
	cursor: pointer;
}
	</style>

If it is losing its properties, check that there are no conflicting styles in other stylesheets.

  • Like 1
This topic is now closed to further replies.
  • Posts

    • Yeah, I totally get your point, which is possible it could happen. I just hope there is a few people around him who are similar to where if they took over things would run pretty much the same. if not, then yeah, it could start to decline rapidly etc. but I figure something that's been around for a longer period of time with a decent backing, and probably more users than most Linux distro's (which I would 'imagine' Mint is one of the more used Linux desktop distro's by volume of people who use it), is less likely to just disappear. but like you said, nothing is guaranteed. but I do think you are probably right in that Clem is probably the core of what keeps Mint, Mint. I like how it tends to stay pretty much the same with some slight tweaks here and there (but is largely the same) instead of that crap some people go for with change for the sake of change trying to create a overly fancy interface and other unnecessary stuff etc. I also feel Mint keeps a nice balance of things out-of-the-box where it's not too bloated, nor too striped down. p.s. but I see Mint as a better Ubuntu basically. but I get your point like if it was more of a really serious choice of needing a 'safe bet' to use long term, then yeah something like official Ubuntu would be one of the better choices for sure given what you said with it being backed by an actual company which makes it a safer bet than Mint which is smaller and 'could' potentially be more fragile.
    • It’s in development so hopefully it’s improved upon before release.
    • For the 10th iteration they could have bothered with some design changes rather than just carrying over the 9's
    • So this requires hardware to be setup in the area you want to listen to music in? And it requires hardware for each user? So useless for me when I'm out walking my dog? Or when I'm at the gym and want to listen to my podcasts rather than the music the gym is broadcasting? Heck, will it even work in my own home and allow me to walk around from room to room, or even within a room? Yeah, these won't be replacing headphones anytime soon.
  • Recent Achievements

    • First Post
      leoniDAM earned a badge
      First Post
    • Reacting Well
      Ian_ earned a badge
      Reacting Well
    • One Month Later
      Ian_ earned a badge
      One Month Later
    • Dedicated
      MacDaddyAz earned a badge
      Dedicated
    • Explorer
      cekicen went up a rank
      Explorer
  • Popular Contributors

    1. 1
      +primortal
      504
    2. 2
      ATLien_0
      211
    3. 3
      Michael Scrip
      200
    4. 4
      Xenon
      147
    5. 5
      +FloatingFatMan
      122
  • Tell a friend

    Love Neowin? Tell a friend!