Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Just trying to give a bold font to an input text

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>
like image 469
ziiweb Avatar asked Mar 23 '11 16:03

ziiweb


2 Answers

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.

like image 184
Czechnology Avatar answered Sep 28 '22 09:09

Czechnology


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>
like image 39
Fareesh Vijayarangam Avatar answered Sep 28 '22 10:09

Fareesh Vijayarangam