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:
UPDATE 2: ... and for comparison, here's how it looks with the solution (background-color: white
) applied - http://jsfiddle.net/CJg43/23/
To make text bold in HTML, use the <b>… </b> tag or <strong>… </strong> tag.
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.
Type the keyboard shortcut: CTRL+B.
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;
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With