WordPress.org

Ready to get started?Download WordPress

Forums

search bar spacing problem in different browsers (2 posts)

  1. sk4sk4
    Member
    Posted 8 years ago #

    I'm trying to add a search bar to my blog. It's placed in the middle of two sets of text links at the very top, in a DIV (#navtop) seperate from the header image (in its own div #header). I set the CSS to height: 25px for #navtop and height: 100px for #header for a total height of 125px for the two areas stacked on top of each other. Everything is formatted properly if the search bar is NOT in the #navtop div. When it is in, the formatting is still good in MOZILLA FIREFOX, but everything gets pushed too low in OPERA, and everything is spaced out too far (high) in IE (the #navtop and #header divs increase in height creating an area with a height greater than 125px).

    Does anyone have any idea of why this would be the case? Here is the code for my search bar. I got it via the Google custom search page.

    <!-- Search Google -->
    <form method="get" action="http://www.google.com/custom">

    Google<input type="radio" name="sitesearch" value="google.com" checked="checked"/>
    SpaceCadetz<input type="radio" name="sitesearch" value="spacecadetz.com" checked="checked"/>
    <input type="text" name="q" size="20" maxlength="255" value=""/>
    <input type="submit" name="sa" value="Search"class="btn"/>
    <input type="hidden" name="cof" value="GALT:green;S:http://www.spacecadetz.com;VLC:blue;AH:center;BGC:white;LC:blue;GFNT:blue;ALC:green;T:black;GIMP:green;AWFID:cb78543507f4b024;"/>
    <input type="hidden" name="domains" value="google.com; spacecadetz.com"/>

    </form>
    <!-- Search Google -->

  2. Sam_a
    Member
    Posted 8 years ago #

    Hard to tell. IE treats height more like min-height, but that wouldn't explain Opera.

    But is there a reason you've set a height for those header elements? I tested your page with

    #header, #navtop, #navmenu { height: auto;}

    and it looked mostly the same. #navmenu was shorter, but you can just add vertical padding to it:

    #navmenu{ padding: 0.5em 0;}

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags