Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't style text on input submit button as bold?

Tags:

css

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

like image 771
flossfan Avatar asked Feb 09 '14 20:02

flossfan


People also ask

How do you make the input value bold?

To make text bold in HTML, use the <b>… </b> tag or <strong>… </strong> tag.

How do I change the submit button text?

The attribute that changes the name shown on the Submit Button is the Value attribute. You can change the text that appears on the Submit Button by setting the Value attribute to the desired name you want.

How do you apply the bold style to text?

Type the keyboard shortcut: CTRL+B.


1 Answers

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;.

like image 84
pschueller Avatar answered Oct 19 '22 12:10

pschueller