Search Form Alignment

Discussion in 'HTML & Website Design' started by jrp1, Jun 16, 2009.

  1. #1
    Hey everyone,

    I'm trying to position a custom search form with a background in a website I'm developing. When I do, it looks great in Firefox, but in IE it throws off the tables.

    Screenshot

    CSS:

    }
    .search_field    {
        border-width: 0px;
        background-image: url(images/image_10.png);
        background-repeat: no-repeat;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        color: #333333;
        width: 340px;
        height: 31px;
        padding-top: 8px;
        padding-right: 40px;
        padding-bottom: 0px;
        padding-left: 65px;
    Code (markup):
    Form:

        <form action="search.php" name="search" method="GET">
                <input type="text" name="query" id="query" class="search_field" style='width:235px;height:23px'>	
                <input type="hidden" name="search" value="1">
              </form>
    Code (markup):
    Does anybody have any ideas how to fix this?


    P.S, please no comments about the disadvantages of tables and why I shouldn't use them, I just need to get this issue fixed. Thanks.
     
    jrp1, Jun 16, 2009 IP
  2. rebelinlove

    rebelinlove Peon

    Messages:
    181
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could try widening the area where your search form is and moving the buttons a little. The problem looks as though the proximity of the buttons is forcing the search box up.

    Move things around and see what happens...Good luck!
     
    rebelinlove, Jun 16, 2009 IP
  3. pipisdicelana

    pipisdicelana Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    the problem maybe on the form element style

    
    <style>
    form
    {
    	margin: 0;
    	padding: 0;
    }
    </style>
    
    HTML:
    i hope it fix
     
    pipisdicelana, Jun 16, 2009 IP
  4. jrp1

    jrp1 Active Member

    Messages:
    93
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    jrp1, Jun 17, 2009 IP
  5. jrp1

    jrp1 Active Member

    Messages:
    93
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #5
    *bump* :)
     
    jrp1, Jun 17, 2009 IP
  6. pipisdicelana

    pipisdicelana Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    are you using margin? if yes add this to the style float:left;display:inline;

    it's hard to say without seeing the code
     
    pipisdicelana, Jun 18, 2009 IP
  7. beezer123

    beezer123 Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Create an "if" condition for IE and then increase the margin top for that search form?
     
    beezer123, Jun 18, 2009 IP
  8. jrp1

    jrp1 Active Member

    Messages:
    93
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #8
    form
    {
        margin: 0;
        padding: 0;
    }
    .search_field    {
        border-width: 0px;
        width: 340px;
        height: 31px;
        background-image: url(images/image_10.png);
        background-repeat: no-repeat;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        color: #333333;
        padding-top: 8px;
        padding-right: 40px;
        padding-bottom: 0px;
        padding-left: 65px; 
    }
    Code (markup):
    This did the trick. I had to put the height/width at the top of the CSS (I guess IE 6/7 didn't register it) and set the form margins and padding to "0". Thanks guys.
     
    jrp1, Jun 18, 2009 IP