12

I'm trying to style the font in an input button as bold.

Here's my code:

<input type="submit" id="nm-match" class="nm-button" value="Match" />

Here's my CSS:

.nm-button {
  text-transform: uppercase;
  padding: 5px;
  color: blue;
  font-weight: bold;
}

All the styles are being applied apart from the bold.

Here's a JSFiddle showing the problem: http://jsfiddle.net/CJg43/1/

UPDATE: Why the close votes? Here's a screenshot of how it looks for me, in Chrome on MacOS:

enter image description here

UPDATE 2: ... and for comparison, here's how it looks with the solution (background-color: white) applied - http://jsfiddle.net/CJg43/23/

enter image description here

flossfan
  • 10,554
  • 16
  • 42
  • 53

2 Answers2

7

When you use numeric values with the font-weight property and you want to use bold then use the value greater than or equal to 700

.nm-button {
  text-transform: uppercase;
  padding: 5px;
  color: blue;
  font-weight: 700;
}

Js Fiddle Demo

Sachin
  • 40,216
  • 7
  • 90
  • 102
7

Are you using chrome for a MacOS? If so, try adding a background-color to the button to see if it fixes it. The default Aqua styles might be interfering. You can also try -webkit-appearance: none; or -webkit-appearance: button;.

pschueller
  • 4,362
  • 2
  • 27
  • 50