02-04-2005, 10:42 AM
i'm working on a page and i want the page to be centred when the user maximises it. Because at the moment it looks a bit pap being stuck in the left part of the page.
The problem is i'm working with a lot of layers.
So i'm wondering if i could group all the layers into one layer and define a css class for it. However i've tried doing that with no joy :( , so i'm open to suggestions :)
02-04-2005, 11:00 AM
umm the code or a link would be nice but just a quick suggestion without actually seeing the code, put all of your content inside a div tag and use margin:auto; for just that div, if u have a valid doctype on your page it should work in IE and will work in other browsers also
02-04-2005, 11:11 AM
should've really mentioned i'm working with dreamweaver too.... got div tags flying everywhere, thing is they're using absolute positioning. As you can see i'm :confused: about what i'm trying to accomplish.
As soon as i tried making a div to cover the page it just made a tiny rectangle and moved that :( . hope this clarifies the level i'm working at.
02-04-2005, 11:22 AM
without any of ur code no one can really help you, but using absolute positioning will make things tough may have to just scrap the positioning and layout your page differently so it would be possible to center it
02-04-2005, 11:54 AM
I suggest you leave the "what you see is wat you (hope to) get" mode of Dreamweaver and enter the coding mode, or use a decent text coding program like Homesite or something :)
That being said, its good to realize how position:absolute and position:relative actually works so that you better understand when to use what.
The following link will take you to the developer center of Microsoft who have a good explanation and example ready for you. After reading that (took me couple times....) you will make no more mistakes and find that centering page will be a breeze, even with everthing in layers.
Microsoft Online html Library (http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/position.asp#position)
Good luck and let us know if it worked for you
02-04-2005, 03:32 PM
Just reading through that info now, i'll let you know if i get stuck ;)
thanks again people,
02-04-2005, 03:43 PM
Managed to make some progress, you're gonna kill me for saying it :eek: , i've managed to get that right on template (i think anyway).
However the page i'm working with has layers too, can i link those divs to the parent of the template, or would i have to create another parent on that page? :confused:
02-07-2005, 02:17 PM
Thanks people :thumbsup: i've still got no idea about the rest of the page... i started another topic on this tho...should've put it on the end of this one "DOH!" :(