Forum Moderators: not2easy

Message Too Old, No Replies

centering in css not working

centering in css not working

         

evilisa

11:08 pm on Dec 30, 2004 (gmt 0)



Hi all,

I've created a site in CSS using Dreamweaver and Golive. I've been trying to get the page to center but can only do it by pushing the pages manually by pixels. This really doesn't work too well. Any ideas? Seeing how the code works in my page would be incredibly helpful if possible!

<No URLs, thanks. See TOS [WebmasterWorld.com] and CSS Forum Charter [WebmasterWorld.com]>

Thanks!

[edited by: SuzyUK at 4:58 am (utc) on Dec. 31, 2004]

jo1ene

11:33 pm on Dec 30, 2004 (gmt 0)

10+ Year Member



Does your code validate?

SuzyUK

11:13 am on Dec 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi evilisa - Welcome to WebmasterWorld!

.. CSS using Dreamweaver ..

If the layout was created using "layers", then it's possible that the site is created using mostly Absolute Positioning (AP) in which case you can only move the those layers (DW speak for AP divs) by changing the co-ordinates.

or

If you don't mind a fixed width or tweaking in the code view, you might be able to use a wrapper div, and get all the divs in your layout to reposition themselves according to it?

#wrapper {
width: 740px; /* or whatever */
margin: 0 auto;
position: relative;
}

then wrap all your page code in it.. something like

<body>
<div id="wrapper">

....all your code....

</div>
</body>

I'm not too familiar with DW so this may be phooey ;)

Suzy