How to center this submit button ?

Discussion in 'HTML & Website Design' started by www.techdo.com, Jan 23, 2006.

  1. #1
    i have this button on my forum, how to align it with the search textbox ?




    .
     

    Attached Files:

    • form.PNG
      form.PNG
      File size:
      1.3 KB
      Views:
      4,019
    www.techdo.com, Jan 23, 2006 IP
  2. Immorta

    Immorta Peon

    Messages:
    379
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <input type="submit" name="x" value="Submit" style="margin-top:2px;">

    No guarantee but that might do it, depends on if you use tables or CSS, if you change the height or the search box etc.

    Paste your code it will be easier for someone to help you.
     
    Immorta, Jan 23, 2006 IP
  3. www.techdo.com

    www.techdo.com Well-Known Member

    Messages:
    526
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Thanks

    The full code is on the index page of my computer forum




    
    
    <form name="form1" method="post" action="search.php"> | Search forums </strong></font> 
     <input name="query" type="text" size="40%">
     <input type="hidden" name="do" value="process" />
     <input type="hidden" name="showposts" value="0" />
     <input name="submit" type="submit" height="11" value="Search">
    </form>
    
    
    HTML:







    .
     
    www.techdo.com, Jan 23, 2006 IP
  4. karmik

    karmik Peon

    Messages:
    329
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Height of inputbox is a bit more then the submit button. You could also get it aligned by changing the font of submit button like below:

    <input name="submit" type="submit" value="Search" style="font-family: Verdana; font-size: 8pt">
     
    karmik, Jan 23, 2006 IP
  5. karmik

    karmik Peon

    Messages:
    329
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Alternatively you could also change it like this if you don't want to change the font site:

    <input name="query" type="text" size="40%" style="vertical-align:middle; margin-bottom:1px;">
    <input name="submit" type="submit" style="vertical-align:bottom;" value="Search">
     
    karmik, Jan 23, 2006 IP
    www.techdo.com likes this.
  6. www.techdo.com

    www.techdo.com Well-Known Member

    Messages:
    526
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #6
    Thanks !
    i will try later
    Dario.




    .
     
    www.techdo.com, Jan 23, 2006 IP
  7. www.techdo.com

    www.techdo.com Well-Known Member

    Messages:
    526
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    110
    #7
    Hi again..

    now i have a similar problem on the other side. Can you help me fix this please ? Thank you.
    Dario



    .
     

    Attached Files:

    www.techdo.com, Jan 24, 2006 IP