Font Size of <input type="button"...

Discussion in 'HTML & Website Design' started by interfx, May 6, 2007.

  1. #1
    How can I change the size of the text of the button generated using the following line?

    <input type="button" value="GO">

    Want to reduce the size of the text "GO", but can not figure this out. KNow it must be simple, but can't make it work quite right.

    Thanks in advance -
    INterFX
     
    interfx, May 6, 2007 IP
  2. clicyu

    clicyu Peon

    Messages:
    22
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you can do it with CSS.
    <input class="button_go" type="button" value="go">
    add to your html document link to css file like this in <head> section:
    <head>
    <title>title of your doc.</title>
    <link rel="stylesheet" href="/css/home.css" type="text/css" />
    </head>
    <body>

    in your root folder make another folder with name CSS.
    inside make new text document.txt and rename it in home.css
    add this line inside home.css:
    .button_go{
    font-size: 0.8em;
    }

    /**you can put 0.7em; or 0.6em;......what is your need**/
    save html and css document.
    refresh in browser.
    have a nice day!
     
    clicyu, May 6, 2007 IP
  3. interfx

    interfx Active Member

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    That worked perfectly... Thanks again for your fast response...
     
    interfx, May 6, 2007 IP
  4. clicyu

    clicyu Peon

    Messages:
    22
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'm glad that is worked.
    You can click on the libra icon next to someone's post in upper right corner of his message to add a reputation point...
    i need it becose i'm new to this forum and i don't wanna have reputation with title peon HEHEHE. :)
    tnx.
     
    clicyu, May 6, 2007 IP
  5. interfx

    interfx Active Member

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #5
    One more related question. I am trying to adjust the witdh of the drop down box. (see attachment)

    Want the drop down menu selection (ie. stock price) to have a controlled width. I tried adding width="200" to the <form ... but did not work...
     

    Attached Files:

    interfx, May 6, 2007 IP
  6. clicyu

    clicyu Peon

    Messages:
    22
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    u can do it the same way...
    add id to that imput field and define it in css :
    <input id="search_text"........
    add this line in css:
    #search_text
    {
    width: 200px;
    }
     
    clicyu, May 6, 2007 IP
  7. interfx

    interfx Active Member

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #7
    That did... I also left positive reputation...
     
    interfx, May 6, 2007 IP
  8. jgjg

    jgjg Peon

    Messages:
    595
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #8
    good tips clicyu!

    it is cool how you can use CSS for webforms...takes some experimenting but you can also make your submit button have a rollover effect.

    same goes for iframes - can style w/ CSS
     
    jgjg, May 9, 2007 IP