Article View: adobe.golive.windows
Article #26Re: Centering pages built with layers
From: Murray
Date: Wed, 04 Mar 2009 12:20
Date: Wed, 04 Mar 2009 12:20
54 lines
2098 bytes
2098 bytes
> 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
Technical Details
Message-ID:
<A748B8DD403A1816CD05ED8BF3155506@in.webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b81b91.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: 101ba1,e05633b3c8e7b17c X-Google-Attributes: gid101ba1,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Murray" <forums@HAHAgreat-web-sights.com> Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.golive.windows Subject: Re: Centering pages built with layers Message-ID: <A748B8DD403A1816CD05ED8BF3155506@in.webcrossing.la2eafNXanI> Date: Wed, 4 Mar 2009 04:20:36 -0800 References: <59b81b91.-1@webcrossing.la2eafNXanI> Lines: 55 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit