29

The button I want is the one at bottom, but the one I have is the top.

enter image description here

The problem arises from the fact that the top button in HTML:

<form class="button_to" method="get" action="/"><input type="submit" value="Ok" /></form>

and the bottom button in HTML:

<button type="button">Ok</button>

The CSS for the top button is:

.signup-success input[type="submit"],
.signup-success input[type="submit"]:active,
.signup-success input[type="submit"]:focus {
  width: 80%;
  background: transparent;
  color: #00AA66;
  border-color: #00AA66;
}

The CSS for the bottom button is:

.signup-success button,
.signup-success button:active,
.signup-success button:focus {
  margin-top: 15px;
  width: 80%;
  background: transparent;
  color: #00AA66;
  border-color: #00AA66;
}

If it helps the top button is generated from rails .erb extension

<%= button_to "Ok", root_path, :method => :get %>

Help me to get my top button look like bottom button. I've tried to put in code that disable shadows in CSS, but it didn't work :(

Smittey
  • 2,475
  • 10
  • 28
  • 35
LarsChung
  • 703
  • 5
  • 10
  • 24

4 Answers4

37

Use border-style:

.signup-success input[type="submit"],
.signup-success input[type="submit"]:active,
.signup-success input[type="submit"]:focus {
  width: 80%;
  background: transparent;
  color: #00AA66;
  border-color: #00AA66;
  border-style: solid;
}

or combined version (border-style, border-width and border-color in one):

border: 2px solid #00AA66;
9

Or you can simply give border: none to your button

Aayushi
  • 1,736
  • 1
  • 26
  • 48
6

Just add a border of your own.

border: 1px solid black;

Or remove the border.

border: none;
José Rasmussen
  • 131
  • 2
  • 5
1

Funny enough adding a border to the button fixed safari's weird drop shadow.

border: 1px solid #34c1e5;
Dan Kaiser
  • 991
  • 8
  • 7