SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: Form properties

  1. #1
    SitePoint Enthusiast jrwap's Avatar
    Join Date
    Oct 2000
    Location
    NJ
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am simply creating a search form to be located in the middle of the page. For some reason there is always a large space after the </form> tag. Why is this and how do I get rid of it.

    I know that it has to do with the form tage because I have ended the form inside of the table an out side of it. If I end it inside the table, the table is extended downwords for no reason.

    Here is the code:

    function search_form_front() {


    ?>
    <CENTER>
    <table border=".25" width="98%" cellpadding="2" cellspacing="0" bordercolor="#C7DAFE" bordercolorlight="#C7DAFE" bordercolordark="#C7DAFE" bgcolor="#E2E2E2">
    <tr>
    <td width="100%">
    <p align="center">
    <FORM METHOD="POST" ACTION="./php_directory.php">
    <INPUT TYPE="TEXT" NAME="keywords" SIZE="29">&nbsp;&nbsp;&nbsp;&nbsp; <INPUT TYPE="SUBMIT" VALUE="Search">
    <INPUT TYPE="HIDDEN" NAME="action" VALUE="show_list">
    <INPUT TYPE="HIDDEN" NAME="search_on" VALUE="1">
    </td>
    </tr>
    </table>
    </FORM>
    </CENTER>


    <?php
    }


    Many thanks,

    -JRW

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its just one of those things... but you solved your own problem - just end it outside the table
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  3. #3
    SitePoint Enthusiast jrwap's Avatar
    Join Date
    Oct 2000
    Location
    NJ
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, but it still leave a rather large void in the middle of the page for god only know what reason. Lots of sites use forms and don't have this problem. How do they do it?

    Thanks,

    -JRW
    Last edited by jrwap; Feb 14, 2001 at 23:37.

  4. #4
    SitePoint Wizard TWTCommish's Avatar
    Join Date
    Aug 1999
    Location
    Pittsburgh, PA, USA
    Posts
    3,910
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think they just tinker - I don't understand, even after battling this problem for months and months (well, sort of), how it all works. If the space it's leaving is still frustrating you, try putting it all the way near the end of your page - right before the closing BODY tag.

    I believe there is some CSS that *might* be able to help you out as well...let me see if I can find it...

    Dang - can't find it, sorry. Try contacting Quinn (qslack - Private Message), I think he might have the code you need - I'm fairly sure he's the one who sent it to me originally.

  5. #5
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    jrwap,

    Try setting the style attributes for the form:

    Code:
    <form style="margin:0px; padding: 0px">
    This should remove most of the spacing applied by default to forms.


    Shane

  6. #6
    SitePoint Enthusiast jrwap's Avatar
    Join Date
    Oct 2000
    Location
    NJ
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks shane, your code worked perfectly.

    -JRW


Bookmarks

Posting Permissions

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