This is a discussion on "Why Cant i center" within the Web Page Design section. This forum, and the thread "Why Cant i center are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Why Cant i center
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Why Cant i center
ok, i have made myself a site, its a portfolio site Link and im wondering how do i center it, its made using AP Divs as i needed layers to create the scroll bar in the middle.
anyways, i've tryed a variaty of ways: Quote:
i've also tryed the usual <center> and the <div align="center"> but for some unbeknown reason i cant center the site Below is my code for my site (without any referals to center) Quote:
|
|
|
|
||||
|
Re: Why Cant i center
wow ... you don't need JS to create a "scrollbox" you know
See the CSS Beginner FAQ - How to get a scrollable area on my page Then ... remove all the position: absolute; And here's how to center you site: How to center your site horizontally body can be used to style too! |
|
|||
|
Re: Why Cant i center
Well I would put all your html into a div called wrap.
css
Absolute positioning will override the code I gave you above. |
|
|||
|
Re: Why Cant i center
edit,
Karrine - i used JS to try and center it not to create a scrollable box and sorry guys but i dont understand how to use the other methods yous said to try and center it, reason being, how can i remove the ABSOLOUTE; from AP Divs (absoloute positioning) - it just screws up my page unfortunatle. any nooooooooooob guides on how to center Ap divs easily ? sorry. Last edited by Innes; Jun 20th, 2007 at 18:44. |
|
||||
|
Re: Why Cant i center
Basically to center a layout horizontally all you need is a width and margin:0 auto; You certainly do not need javascript to handle this. Also you need to deal with people with s disabled, if you rely on js to display your page you will alienate a bunch of users.
If you need to do both vertical and horizontal centering then this example will show you how to do it with css. http://www.newguyinennis.com/samples...centering.html
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Last edited by moojoo; Jun 20th, 2007 at 18:55. |
|
|||
|
Re: Why Cant i center
ill give it a wirl and edit my post, and im using Adobe Dreamweaver CS3, i prefered 8.0 tbh but this will do the now.
Edit - nope, it didnt center, its still at the left. But i cant see how i can remove absoloute positioning from Absoloute Positioning divs. =( Last edited by Innes; Jun 20th, 2007 at 19:06. |
|
||||
|
Re: Why Cant i center
http://www.newguyinennis.com/samples/layouts/ would be the correct url. No direct link from my site heh.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
![]() |
| Tags |
| need help |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Div bg images..will not center? | jahphill | Web Page Design | 5 | Jun 2nd, 2008 09:03 |
| how can i center this? | djcritch | Web Page Design | 6 | Feb 25th, 2008 07:06 |
| center | alexgeek | Web Page Design | 1 | Aug 2nd, 2007 03:30 |
| Center a Swf Help?? | nutbolt | Web Page Design | 20 | Apr 9th, 2007 10:21 |
| just want to center this | ragingmon | Web Page Design | 9 | Dec 29th, 2006 18:07 |