#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Surrey, UK
    Posts
    224
    Rep Power
    11

    css not working for text input boxes


    Hi there, I have this basic CSS:
    Code:
    input.text {
    	font-size: 11px;
    	border: 1px #93A6C6 solid;
    	background-color: #FFFFFF;
    	color: #3F5674;
    	font-family: Arial, Helvetica, sans-serif;
    }
    
    select {
    	font-size: 11px;
    	background-color: #FFFFFF;
    	color: #3F5674;
    	padding-right: 3px
    }
    
    textarea {
    	font-size: 11px;
    	border: 1px #93A6C6 solid;
    	background-color: #FFFFFF;
    	color: #3F5674;
        font-family: Arial, Helvetica, sans-serif; letter-spacing: 0px; word-spacing: 1pt;
    }
    The input box style isn't working correctly. The text I type in is coming out black and in a larger font than specified. If I just use style input rather than input.text it does work, but then it will put square borders around radio check boxes, which I don't want. Any ideas why it isn't working? This is the form it is being used on:
    Code:
    <form name="Albums Search" method="get" action="searchresults.php">
        <table  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><div align="center">
              <input name="searchterm" type="text" tabindex="1" size="50" maxlength="75">
            </div></td>
            <td rowspan="2" align="center" valign="middle"><div align="center">
              &nbsp;&nbsp;<input type="submit" value="Search">
            </div></td>
          </tr>
          <tr>
            <td><div align="center">Artist:
              <input name="searchtype" type="radio" value="artist" checked>
              &nbsp;&nbsp;&nbsp;
    Title:
    <input name="searchtype" type="radio" value="title">
    &nbsp;&nbsp;&nbsp;
    Year:
    <input name="searchtype" type="radio" value="year">
            </div></td>
          </tr>
        </table>
        <p>
          <textarea name="textarea"></textarea>
      </p>
    </form>
    Thanks
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Surrey, UK
    Posts
    224
    Rep Power
    11
    Not to worry, from reading around, it seems that it wont work, I need to make a seperate class and then call that class for each textbox seperately ie .text { color: etc }
    and then call it like input type="text" class="text"
  4. #3
  5. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,122
    Rep Power
    4258
    Ah, I see what you didn't understand. A class has nothing to do with an input type.

IMN logo majestic logo threadwatch logo seochat tools logo