Ezilon.com - Target Your Audience, be Seen in Your Region

Centralise site on page

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 1 posts

Joined: Feb 2008

I would like my site to appear cebtrally within the browser window after resizing or regardless of the screen resolution.

Is this fairly easy to do? The site has been created using dreamweaver MX
and is at the following URL

http://www.1stautoclear.co.uk/

regards

Paul
Webmaster 1st Auto Clear

JeevesBond's picture
Moderator

He has: 3,499 posts

Joined: Jun 2002

Change this line:

<div id="Layer1" style="position:absolute; width:767px; height:729px; z-index:1; top: 0px; left: 0px;">

to:

<div id="Layer1" style="width:767px; margin: 0 auto;">

Unfortunately Internet Explorer doesn't support standards, so we'll have to add in a hack for that browser, so change:

<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
.style2 {font-family: Arial, Helvetica, sans-serif}
.style3 {font-size: 10px}
-->
</style>

to:

<style type="text/css">
<!--
.style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
.style2 {font-family: Arial, Helvetica, sans-serif}
.style3 {font-size: 10px}
body { text-align: center; }
#Layer1 { text-align: left; }
-->
</style>

Give that a try and let us know how you get along. Smiling

a Padded Cell our articles site!

He has: 314 posts

Joined: May 2007

I'm afraid your page is broken in all my browsers this end. See this screen grab from IE 7: http://webwiz.robinshosting.com/temp/images/1stautoclear.png

I suggest using floats instead of absolute positioning for the images. That way the text will wrap the images.

Cordially, David
--
"Old web developers don't die, they degrade gracefully..."