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
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Html input form messing up vertical alignment

    The use of this form is making forcing my vertical alignment to the top:



    You can see in the second column the search form is on the top, I can't make it go to the middle no-matter what I do, here is the info

    The table:

    <table class="topbar" border=1>
    <tr><td align="left">
    <a href="<?php bloginfo('url'); ?>">Home</a> | <a href="general/">General</a> | <a href="Military/">Military</a> | <a href="articles/">Articles</a>
    </td>
    <td align="right">

    <form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>"><a>Search</a><input type="text" class="input" name="s" id="search" size="15" onFocus='form.s.value=""'/></form>

    </td>
    </tr></table>


    Here is my css for class 'topbar'

    .topbar {
    padding-top: 3px;
    padding-left: 5px;
    padding-bottom: 3px;
    padding-right: 5px;
    width: 835px;
    height: 17px;
    background: #ffffff;
    vertical-align: middle;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    margin-left: 10px;
    margin-right: 10px;
    }



    I've been troubleshooting this for about an hour now and am totally clueless, I've narrowed it down to the form tag itself because when I take it out it aligns fine and looks how it is suppost to. I don't know why the form is forcing it to align to the top.

    Any help would be grrrrrrrrrrrrrrrrrreatly aprecciated,

    Thanks

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Man hours? Wow! You might feel a bit silly now. Its the default form margin.
    in your css add this
    Code:
    form {
    margin:0;
    padding:0;
    }
    Last edited by _Aerospace_Eng_; 05-26-2005 at 04:03 AM.

  • #3
    New to the CF scene
    Join Date
    May 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sure do, but at least it works now

    thanks a bunch


  •  

    Posting Permissions

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