On Sat, 24 Jan 2004 16:19:55 +0200, Lauri Raittila wrote:[color=blue]
> In article Oliver Burnett-Hall wrote:[color=green]
>> The four
>> options are then contained within a parent div, also floated left, with
>> a width of 100%. This works in Gecko-based browsers and Opera, but
>> doesn't in IE5 - the menu extends off to the right of the viewport.[/color]
>
> Wy do you float the container?[/color]
It seemed like a good idea at the time :) I've spent so long trying to
get this to work on all browsers that I've forgotten what the reasons for
various bits are.
But I agree - floating the container is unnecessary. I'm almost certain I
tried doing it without floating the container div, and it still wasn't
working on IE5. When I'm back at work I'll try this again to confirm (I
don't have IE at home to test with).
[color=blue]
> IE5 has broken box modell, it counts margin and padding and border to
> width, so it might be just that it thinks width of container is same as
> viewport. Use another container or tantek hack.[/color]
It's not that in this case; in the full version of the page I'm already
using the Tantek hack to give correct width to the left-hand section. I
removed it from the simplified version of the page as it didn't make any
difference to this problem.
[color=blue]
> URL would be better. Especially as you used XHTML and didn't tell how
> you serve it. There is no easy way to try thise things using IE, so I
> looked only in Opera...[/color]
Okay, try
http://www.burnett-hall.co.uk/~ojbh/misc/width.html. Though
this isn't the same as the production environment; it's for the intranet
at work where the content is dynamically generated using XSLT (transformed
using MSXML, served by IIS).
[color=blue][color=green]
>> div.option {
>> display: inline;
>> float: left;
>> text-align: center;
>> width: 25%;
>> }[/color]
>
> Well, this pointless use of display:inline and float could be problem
> too. You have a block element. Then you make it inline element. THen you
> float it, which also means that it will be block again.[/color]
Heh. That probably explains the dizziness - I've been going round in
circles.
[color=blue]
> Width don't apply to inline-elements.[/color]
Yeah, I know - that's why I floated it. On Monday I'll get rid of this
display: inline and see if it has any affect (but I doubt it will).
Cheers,
- olly
--
Oliver Burnett-Hall
rot13://byyl@oheargg-unyy.pb.hx