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
    Sep 2002
    Posts
    157
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Search form position problem with Opera

    I have put in search form box inside header div and positioned it using:

    CSS
    #search {
    left: 200px;
    top: 120px;
    position: relative;
    display: inline;
    }

    HTML
    <div id="search">
    <form id="searchform" method="get" action="<?php bloginfo('home'); ?>"><input type="text" name="s" id="s" size="15" value="search" /></form>
    </div>

    It is fine in IE 7 and Firefox but in Opera, it is still in top corner of header. Any clue?

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    By default <form> is block level. You have declared #search to have display: inline. But you cannot nest block level elements within inline elements. Opera is apparently not so forgiving as other browsers.

    Try removing display: inline for your #search. If this is not working you may have to show us your live page.

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Posts
    157
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks! Removing block sorted it out..I have created a problem of my own!


  •  

    Posting Permissions

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