Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page does not work in IE 2

Status
Not open for further replies.

Jpln

Technical User
Feb 23, 2005
67
GB
Hi,

I have incorportated a google site search facility into my web page. In Firefox everything looks fine, but IE6 puts a huge gap between my top nav and the banner.

Please see I am only testing at the moment, so the broken page can be viewed by selecting 'The Practice' tab from the index page.

Is there a fix for IE? Thanks.

Here is the top section of my css.
body {
margin: 0;
padding: 0;
background: #fff url(../images/bg.gif) repeat-x;
font: normal .7em Tahoma, Verdana, Arial, Helvetica, Sans-Serif;
line-height: 1.6em;
color: #333;
}

/* LINKS AND HEADINGS STYLING */

a { color: #546F92; background: inherit; }
a:hover { color: #808080; background: inherit; }
h1 { font: bold 2em "Trebuchet MS", Helvetica, Sans-Serif; margin: 0; color: #fff; background-color:transparent; }
h2 { font: bold 1.4em "Trebuchet MS", Helvetica, Sans-Serif; }
h3 { clear: both; font-size: 1.1em; color: #000; background: #fff url(../images/h3bg.gif) no-repeat center left; padding: 0 14px; margin: 0;}
.blue { color: #546F92; background: inherit; }
.image { float: left; border: 2px solid #e2e2e2; padding: 3px; margin: 0 15px 10px 0; }

/* CONTENT WRAPPER */

#wrapper {
width: 900px;
margin: 25px auto 0 auto;
}

/* TOP LEFT - WEBSITE NAME HEADER */

#header {
float: left;
padding: 10px 0 10px 10px;
}
#header h1 { color: #000; background: #fff; }
#header .search {
/*float: right;*/
padding: 0px 0px 0px 0px }

/* TOP RIGHT - MENU NAVIGATION */

#topnav {
float: right;
background: #fff url(../images/barul.gif) no-repeat bottom right;
color: #808080;
padding: 18px 1px 11px 0;
margin:20px 0px 0px 0px;
}
#topnav li {
padding: 14px 18px 14px 18px;
color: #444;
background: #fff url(../images/bar.gif) no-repeat bottom left;
display: inline;
}
#topnav li.active {
background: #fff url(../images/baractive.gif) no-repeat bottom left;
color: #8D9CAF;
font-weight: bold;
padding: 14px 18px 14px 18px;
margin: 0 1px 0 0;
}
#topnav li a {
background: #f8f8f8;
color: #808080;
text-decoration: none;
}
#topnav li a:hover {
color: #000;
background: #f8f8f8;
}
.key { text-decoration: underline; } /* ACCESKEY UNDERLINED LETTER */


/* LEFT SIDE - SUBHEADER */
#subheader {
clear: left;
float: left;
width: 250px;
background: #8D9CAF url(../images/leftintrobg.gif) repeat-x;
color: #E5EAF2;
margin: 0 0 1px 0;
}
#subheader a { color: #fff; background: inherit; }
#subheader p { padding: 14px 15px; margin: 0; }

/* RIGHT SIDE - BANNER */

#banner {
float: right;
width: 340px;
padding: 25px 280px 0 20px;
background: #BCCEDA url(../images/banner.jpg) no-repeat;
color: #547592;
margin: 0 0 6px 0;
height: 174px;
border: 2px solid #e2e2e2;
}
#banner h1 { margin: 0 0 20px 0; }
#banner .white { color: #FFF; background-color:transparent; }


/* LEFT COLUMN - MENU NAVIGATION */

#leftnav {
float: left;
margin: 0 0 6px 0;
padding: 0 0 1px 0;
border-bottom: 2px solid #e2e2e2;
}
#leftnav li { list-style: none; }
#leftnav li a {
display: block;
color: #3F5B7F;
background: #C2CEDE url(../images/arrow.gif) no-repeat center left;
width: 204px;
padding: 7px 23px 7px 23px;
margin: 0 0 1px 0;
font-weight: bold;
text-decoration: none;
}
#leftnav li a:hover { background: #9EB1C9 url(../images/arrow.gif) no-repeat center left; color: #fff; }
 
The issue is the google search box. I didn't test this, but try setting the
Code:
vertical-align: bottom;

in #topnav {}

(i.e ...
Code:
...
#topnav {
    float: right;
    background: #fff url(../images/barul.gif) no-repeat bottom right;
    color: #808080;
    padding: 18px 1px 11px 0;
    margin:20px 0px 0px 0px;
    vertical-align: bottom;
}
...
 
Another option would be to move the google search bar to a different location. Maybe above the top right navigation menu?

Jason
 
Thanks for the reply guys. I tried vertical-align: bottom, but no joy, the gap between the top nav and the start of the banner is still there.

If I put the search box above the top nav, it pushes that whole right section down.
 
On a slightly different note...

Take a look at the site in Safari - the nav section is unusable.

You can get Safari 3b for Windows and should see the same thing as I do when viewing in Safari on the Mac. Installing Safari 3b on Windows will not replace IE or Firefox (and you can uninstall it later without a problem should you need to).

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
try this in css file
#header .search form {margin: 0; padding: 0;}
 
Many thanks Camyba, that has fixed the problem.

Thanks for the info on Safari also, jeff; I shall download it.

Amanda
 
Glad I could help!
For future projects try adding something like this at the start of your css file:
a, a:hover, div, img, h1, h2, h3, h4, h5, h6, ul, li, ol, table, tr, td, p, form {margin: 0; padding: 0; border: 0;}

This kind of problems will be solved before they appear.
 
Will do, thanks for the tips. I'm just learning as I go, so tips like these will put me in good stead for future projects.

Thanks again guys.
Amanda
 
you can to this
* {border:1px solid red;}/* will make all div, p,h1,h2... with red borders*/

You will see what div is making problems, than all you need to do is to set the margin and the padding

Of course you will have to change from * {border:1px solid red;} in .whatever {border:1px solid red;} to debug, also try to debug first in firefox ;)

whend all you need is time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top