How to use a Class is a form tag?

Discussion in 'CSS' started by aguswgs, May 2, 2011.

  1. #1
    I have prepared a piece of code.I want to change the location and font size of the word United States of america.
    Also I want to change the location of the search box and submit query button.

    Here is my code using FORM tag(HTML)

    In short,I want the sentence United States of america,button and input box at the center of the screen.Right now it's coming at the left top side.

    Please help me in doing this.


    <HTML><HEAD><TITLE>United States of America</TITLE> </HEAD>
    <BODY>
    <FORM METHOD="POST"
    ACTION="/cgi-bin/post-query">
    <p>United States of America</p>
    <INPUT XMLFILE="in_xml" TYPE="text" SIZE=40><P>
    
    <INPUT TYPE="submit" VALUE="SubmitQuery">
    </FORM></BODY></HTML>
    HTML:
     
    aguswgs, May 2, 2011 IP
  2. Projekt.Gopher

    Projekt.Gopher Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <HTML>
    <HEAD>
    	<TITLE>United States of America</TITLE> 
    	<style>
    		html, body { text-align: center; }
    		#form { display: inline; margin: auto; }
    		form { display: inline;}
    	</style>
    </HEAD>
    <BODY>
    	<div id="form">
    		<FORM METHOD="POST" ACTION="/cgi-bin/post-query">
    			United States of America
    			<INPUT XMLFILE="in_xml" TYPE="text" SIZE=40>
    			<INPUT TYPE="submit" VALUE="SubmitQuery">
    		</FORM>
    	</div>
    </BODY>
    </HTML>
    HTML:
     
    Projekt.Gopher, May 2, 2011 IP