24-10-2006, 08:50 PM
Here's a problem for you to solve.
I've been testing out position: fixed and max-width and min-width on IE7 and Firefox.
I want to use position: fixed only in a vertical direction for a banner across the top of the screen which won't scroll but I also want to use margin: auto to centralise at various window resolutions so it needs to move left and right for max and min div widths and centralise above the max.
A div with position: fixed will react to max-width and min-width, but only at the right end. The left end is fixed relative to the top left window corner.
It doesn't make any difference whether I use an image or a background image in the banner, position: fixed won't release it from the top left corner.
It's a pity it doesn't work like overflow-x and overflow-y which can have different attributes.
I've been testing out position: fixed and max-width and min-width on IE7 and Firefox.
I want to use position: fixed only in a vertical direction for a banner across the top of the screen which won't scroll but I also want to use margin: auto to centralise at various window resolutions so it needs to move left and right for max and min div widths and centralise above the max.
A div with position: fixed will react to max-width and min-width, but only at the right end. The left end is fixed relative to the top left window corner.
It doesn't make any difference whether I use an image or a background image in the banner, position: fixed won't release it from the top left corner.
It's a pity it doesn't work like overflow-x and overflow-y which can have different attributes.