Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Centering pages built with layers

2 views
Skip to first unread message

joan_o...@adobeforums.com

unread,
Mar 3, 2009, 10:57:12 PM3/3/09
to
I've built a website using layers (not tables) in GoLive (Windows). How do I center it in the browser window? (Because my layers overlap, I can't put them into a table.) Is it possible?

Murray

unread,
Mar 4, 2009, 7:20:36 AM3/4/09
to
> Is it possible?

Certainly, although when you finish you will still have a sow's ear of
problems with content in your absolutely positioned containers ('layers').
Do you know about those? The most troublesome one is the one that occurs
when you browse to the page and increase the browser's text size display.
The problem is caused by the inherent nature of absolute positioned
elements - they expand vertically (or even overflow if a height has been
specified for them) without regard for any other content on the page.

At any rate here's how to center -

It depends on whether you are using absolute positioning on the page, as to
which method might be best, but in either event, this will work -

Change this -

</head>

to this -

<style type="text/css">
#wrapper { width:760px; margin:0 auto;position:relative; }
/* 760px will display on an 800px screen maximized browser window without */
/* horizontal scrollbars. */
</style>
</head>

change this -

<body ...>
(the ellipsis represents any other attributes that might be mentioned in the
body tag, and SHOULD NOT BE INCLUDED EXPLICITLY!)

to this -

<body ...>
<div id="wrapper">

and this -

</body>

to this -

<!-- /wrapper -->
</div>
</body>

and see if that helps.


--
Murray

Nate_B...@adobeforums.com

unread,
Mar 4, 2009, 10:40:59 AM3/4/09
to
Here's a GoLive-y tutorial on that:
<http://mindpalette.com/tutorials/center_layers/>

joan_o...@adobeforums.com

unread,
Mar 7, 2009, 11:55:45 PM3/7/09
to
thanks, very helpful!

joan_o...@adobeforums.com

unread,
Mar 7, 2009, 11:54:29 PM3/7/09
to
Thanks. The tutorial was very illuminating!
0 new messages