Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    two forms not aligning.

    Unfortunately, I am running my site off of my home server and its off this weekend so here is my pasteHTL site, but I need help aligning two forms. Here is the source (sorry if its messy)


    Code:
    <div style="border:1px solid blue;width:100%;height:200px;text-align:center;position:relative;top:200px;">
                      <form name="searchform" action="page2.html" method="get">
                               <div style="border:1px solid red;width:100%;text-align:center;">
                                        <input type="text" name="search" size="75" />
                               </div>
                               <div style="border:1px solid green;width:45%;	text-align:left;float:right;">
                                        <input type="submit" value="Search" />
                      </form>
                      <form name="somethingform" action="page3.html" method="post">
                               </div>
                               <div style="border:1px solid yellow;width:45%;text-align:right;float:left;">
                                        <input type="submit" value="Do Something" />
                               </div>
                      </form>
    </div>
    I really want to have the "Do Something" button vertically align with the "Search" button. The search button should be sending the search bar text to "page2" while the "Do Something" button should send the user to page3. So I don't really need a form for the "Do Something", but I would like the two styles to match.

    Any help would be appreciated,
    ~Pard
    Last edited by Pardner; 11-25-2011 at 07:37 PM.

  • #2
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You mean this way? You still have to add your effects.

    Code:
    <head>
    <style type="text/css">
    .searchForm {
    	width:500px;
    	text-align:center;
    }
    .searchButton {
    	width:100px;
    	text-align:center;
    }
    .somethingForm {
    	width:100px;
    	text-align:center;
    }
    </style>
    </head>
    
    <body>
    <div class="searchForm"><input type="text" name="search" size="75" />
    </div>
    <div class="searchButton"><input type="submit" value="Search" />
    </div>
    <div class="somethingForm"><input type="submit" value="Do Something" />
    </div>
    </body>

  • #3
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, that looks great! But it doesn't do anything! I am confused on how I would link the "Search" button and the text bar and have the action target page2, and have the "Do Something" button target page3. Don't you still need the <form> tags to do this?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •