On Dec 4, 7:08 am, GTalbot <newsgr...@gtalbot.orgwrote:
On 2 déc, 14:55, "seaj...@hotmail.com" <seaj...@hotmail.comwrote:
Hi - I've managed to get this site working in Firefox and IE6, without
any horizontal scrolling, but for some reason IE7 is insisting on
horizontal scrolling by quite a wide margin.
Does anyone have any pointers on what might be going on here?
Site is at:http://tinyurl.com/36oznb/
Thanks,
Colin.
Hello Colin,
I checked your webpage and you have at least 5 unneeded CSS rules.
html>body #header { /* IE ignores this block as it doesn't understand
the selector */
height: auto; /* Reset the height for good browsers */}
and
html>body ul#navlist { /* IE ignores this block as it doesn't
understand the selector */
height: auto; /* Reset the height for good browsers */}
won't work in Internet Explorer 7.
I think that's intentional - it's really IE6 that needs to ignore it,
IE7 and other 'good' browsers should do it. The problem it fixes was
that without this you have to set a fixed height which then breaks
when you resize the fonts at the browser if the menus go onto more
than one line.
>
You also over-code, over-define and over-declare your CSS code and I
would definitely reduce the DOM tree: there are several empty block-
level elements (just for the sake of clearing or ventilating).
I know I have a tendency to do this - my CSS is not particularly
strong, and tends to be a mish-mash of things picked up from all over
the place! :-)
When you say "over-code, over-define and over-declare", are they three
different things, or alliteration to emphasise one thing? Would you
mind giving me an example of something you would change to help
streamline it? It'll point me in the right direction!
>
Anyway, what's causing the horizontal scrollbar is the combination of
font-style: italic and float: right. This is a known bug in Internet
Explorer 7.
Thanks for that - some people seem to suggest "overflow: auto;" as a
workaround?
Cheers,
Colin.