I know people sometimes frown upon using PS slices to CSS, but it allows me to make quick landing pages.

These are very simple pages, very small 750x550 or so, so I tried creating how I want it to look in PS. I slice up different areas, as some I will add in text later in Dreamweaver.

I go to Save for Web and Devices, output to slices, and I choose to generate CSS.

This works fine except the resulting HTML position to upper-left. I can't get this to just center the whole thing into the page.

What is the simplest way to get everything to just center horizontally?

<!-- Save for Web Slices (lp1.psd) -->
<div style="position:absolute; left:0px; top:0px; width:592px; height:470px;">
	<div style="position:absolute; left:0px; top:0px; width:592px; height:111px;">
		<img src="images/lp1-01.gif" width="592" height="111" alt="" />
	</div>
	<div style="position:absolute; left:0px; top:111px; width:592px; height:177px;">
		<img src="images/lp1-02.gif" width="592" height="177" alt="" />
	</div>
	<div style="position:absolute; left:0px; top:288px; width:592px; height:30px;">
		<img src="images/lp1-03.gif" width="592" height="30" alt="" />
	</div>
	<div style="position:absolute; left:0px; top:318px; width:86px; height:152px;">
		<img src="images/lp1-04.gif" width="86" height="152" alt="" />
	</div>
	<div style="position:absolute; left:86px; top:318px; width:418px; height:57px;">
		<img src="images/lp1-05.jpg" width="418" height="57" alt="" />
	</div>
	<div style="position:absolute; left:504px; top:318px; width:88px; height:152px;">
		<img src="images/lp1-06.gif" width="88" height="152" alt="" />
	</div>
	<div style="position:absolute; left:86px; top:375px; width:418px; height:95px;">
		<img src="images/lp1-07.gif" width="418" height="95" alt="" />
	</div>
</div>
<!-- End Save for Web Slices -->

NM,

Used

#container {
height:471px;
width:592px;
margin: 0 auto;
position:relative;
}

To wrap everything up. I'm slowly learning here =)

Thanks a lot!!!!!!!! You saved my life, I'm so happy with the answer, now it's working!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.