|
Posted by Els on 08/03/05 16:46
cosmic foo wrote:
> i was just working on a similar problem.
> the client wants the page to be filled at 800x600,
> and centered if 1024x768.
> so i came up with this (which i have a feeling is not so great,
> but it seems to work in ie and firefox),
>
> <div id="abc" style="position: absolute; top: 0px; left: 0px; width:
> 790px;">
> <script language="JavaScript" type="text/javascript">
> document.getElementById("abc").style.left = (screen.availWidth -
> 800)/2 + "px";
> </script>
>
> ..a bunch of absolute positioned divs..
>
> </div>
Not too sure about the script (I don't speak JavaScript), but doesn't
that mean centered in a maximized window only?
Like, if my screensize is 1600x1200, and my browserwindow is only
800x600, I'll only see the top left quarter of the page?
And out of curiosity, wrt to the 'bunch of absolute positioned divs':
what does your page look like when I make the text twice as big?
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
[Back to original message]
|