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
    Regular Coder
    Join Date
    Jul 2005
    Posts
    131
    Thanks
    21
    Thanked 0 Times in 0 Posts

    Issues with Forms on a layout

    Hi,

    Im have a question regarding forms, the ruddy things always leave a blank row after/below them which after spending a while coming up with a nice layout, now goes about its ways and destroys the look of it.

    Im not sure if this is just how things are, and theres no way of getting around it, but i thought rather than pretty much rip up the original site design find out if there something i can do to correct the problem.


    Effectively if i create a table with a cell that is w200 x h20 and then put a form inside it with or without a textbox, the space it now occupies exceeds the 20 pixel height which ive specified for it. Its about 45pxls tall instead of the 20 I need it to be. Theres always a blank row which isnt asked for, and certainly isnt wanted, but there it sits ruining what im trying to create.

    screenshot example:


    Below is my code creating the 3rd table seen in the example:
    Code:
    <form id="form1" name="form1" method="post" action="">
    <div align="center">
    *<input name="textfield" type="text" size="15" />
    </div>
    </form>

    Is there any getting around these problems?? Either a better/correct way of doing the form and its components, or something else i can use to get around the issue of this stretching parts of my site.
    I originally thought about putting the forms onto layers, ive not used them much but occasionally in the past when needed, however the layout is centered to the page, and i dont know if its possible to lock a layer to a fixed point centrally rather than 0,0 being the top left, i'd need 0,0 being the top center (using negative values to go left of center etc)

    Please help me, the last thing i need now is to realise i need a whole new re-design.

    Many thanks in advance,
    PaulC2K
    Last edited by PaulC2K; 12-08-2005 at 07:18 AM.

  • #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
    Code:
    <form id="form1" name="form1" method="post" action="" style="margin:0;padding:0;text-align:center">
    <div>
    *<input name="textfield" type="text" size="15" />
    </div>
    </form>
    align="center" is deprecated and shouldn't be used. CSS should be used in its place. Your main problem was a form has a default margin.

  • #3
    Regular Coder
    Join Date
    Jul 2005
    Posts
    131
    Thanks
    21
    Thanked 0 Times in 0 Posts
    hmmm, so its Dreamweavers way of going about it which has been messing me about, guess it serves me right for being lazy!

    Thanks heaps for that Aero!


  •  

    Posting Permissions

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