I'm trying to give a bold font to an input this way below but it doesn't work..
<html>
<head>
</head>
<body>
<style type=”text/css”>
.jander2{
font-weight: bold;
}
</style>
<form method="post" action="somepage">
<input id="jander" class="jander2">
</form>
</body>
</html>
Your <style>
should be in the <head>
section:
<html>
<head>
<style type="text/css">
.jander2{
font-weight: bold;
}
</style>
</head>
<body>
<form method="post" action="somepage">
<input id="jander" class="jander2">
</form>
</body>
</html>
EDIT: To satisfy the commenter: use only standard double quotes, no curly special quotes as you had in your <style>
tag.
This works:
http://jsfiddle.net/4rAhy/
Code here:
Inline style: <input type="text" style="font-weight: bold;"></input><br />
<style>
.jander2 {
font-weight: bold;
}
</style>
External Style: <input type="text" class="jander2"></input>
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