Form Style & Font Size

Discussion in 'HTML & Website Design' started by travoholic, Mar 22, 2007.

  1. #1
    Hello,

    I'm working on a form at the moment but I'm not happy with the size of the fields (vertically) and fonts within them. I would like something smaller. Can someone help or point me in the right direction?

    Thanks!
    Kirsty
     
    travoholic, Mar 22, 2007 IP
  2. bacanze

    bacanze Peon

    Messages:
    2,419
    Likes Received:
    127
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Apply a class to the fields, like

    .inputname {
    height: 2em; /* px can also be used*/}

    Hope it helps
    Ash :)
     
    bacanze, Mar 22, 2007 IP
  3. PoemofQuotes

    PoemofQuotes Peon

    Messages:
    637
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can also do something like:

    input[type="text"] {
    height: 20px;
    }

    Where "text" equals to whatever, can be submit or password, maybe some others as well.
     
    PoemofQuotes, Mar 22, 2007 IP
  4. travoholic

    travoholic Well-Known Member

    Messages:
    299
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Ok sorry, I'm hopeless with CSS. Where exactly would I put either of those bits of code? An example of the code I have on my page is below. Do I put what you've said into my stylesheet? How do I apply it to the code below?

    <select name="Pickup Location">
    <option value="ACTON" >ACTON (London)</option>
    <option value="DERBY" >DERBY</option>
    </select>

    Thanks again! (Hopeless, I know. I keep meaning to learn all this but just no time!)
     
    travoholic, Mar 23, 2007 IP
  5. Dediwebspace

    Dediwebspace Active Member

    Messages:
    469
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #5
    Make a stylesheet for it
     
    Dediwebspace, Mar 23, 2007 IP
  6. dmi

    dmi Well-Known Member

    Messages:
    2,705
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    140
    #6
    <select class="yourclassincss" name="Pickup Location">
    <option value="ACTON" >ACTON (London)</option>
    <option value="DERBY" >DERBY</option>
    </select>

    It should work.
     
    dmi, Mar 23, 2007 IP
  7. travoholic

    travoholic Well-Known Member

    Messages:
    299
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #7
    Ah ok, that makes sense. Thanks a million!
     
    travoholic, Mar 24, 2007 IP
  8. travoholic

    travoholic Well-Known Member

    Messages:
    299
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #8
    Sorry... if my class is called 'form' then what exactly do I type in my CSS file to reduce the size of the font/input boxes on my site in pixels?
     
    travoholic, Mar 25, 2007 IP