...

View Full Version : two forms not aligning.



Pardner
11-25-2011, 08:23 PM
Unfortunately, I am running my site off of my home server and its off this weekend so here is my pasteHTL site (http://pastehtml.com/view/bf7w6u1pf.html), but I need help aligning two forms. Here is the source (sorry if its messy)



<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

GuessMyName
11-25-2011, 08:49 PM
You mean this way? You still have to add your effects.


<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>

Pardner
11-26-2011, 01:57 AM
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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum