Validating a form make the design mess up on IE

Discussion in 'HTML & Website Design' started by versus2, Jan 19, 2009.

  1. #1
    I have this code on a site:

    <form action="<?php echo BASEURLPATH?>/search/" method="post">
    <td style="padding-bottom:5px;" valign="bottom">
    <input type="text" name="ss_fn" size="29" value="<?php _e('Search');?>..." onfocus="javascript:if(this.value=='<?php _e('Search');?>...')this.value='';" onblur="javascript:if(this.value=='')this.value='<?php _e('Search');?>...';" class="box" />&nbsp;&nbsp;&nbsp;<input type="image" src="<?php echo BASEURLPATH?>/images/search_icon.jpg" />
    </td></form>
    Code (markup):
    Now, this way it's not w3c validated because the form tags are outside of the td (it should be inside).

    The problem is that if i put the form inside the td it mess up the design on IE (on FF it's ok). It's like making spaces or something..

    Any idea ?
     
    versus2, Jan 19, 2009 IP
  2. katendarcy

    katendarcy Peon

    Messages:
    115
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Didn't try this, but you could try adding, (either via "style=" on the form tag, or "form{}" in the CSS), "margin:0;padding:0;". You could also try adding "float:left", but I'm not sure if that will mess up the rest of your layout. See if either of those works. : )
     
    katendarcy, Jan 19, 2009 IP
  3. versus2

    versus2 Well-Known Member

    Messages:
    796
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    110
    #3
    It worked :) Thanks a lot
     
    versus2, Jan 20, 2009 IP
  4. katendarcy

    katendarcy Peon

    Messages:
    115
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No problem. I'm glad it worked out for you. Sometimes it's the not so obvious thing. But, I remembered having a similar problem before. Take care.
     
    katendarcy, Jan 20, 2009 IP