This is a discussion on "[SOLVED] page centering issues" within the Web Page Design section. This forum, and the thread "[SOLVED] page centering issues are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] page centering issues
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
[SOLVED] page centering issues
Can anyone explain the following:
On my indexpage I run a slideshow using javascript. I have centered my page using:
a shift occurs of 5 pixels to the left, and 8 pixels to the top. I can prevent this by just putting a <script></script> in the header of the other page. But I would like to understand why this happens. http://www.cosmicwebdesign.nl/akker/index.php http://www.cosmicwebdesign.nl/akker/kbp1.php |
|
|
|
|||
|
Re: page centering issues
Your code is invalid, with 24 HTML errors. Fix them first, then see whether you still have the problem.
Note also that this is a bad method for centring your site and controlling margins. Use CSS instead. |
|
||||
|
Re: page centering issues
Use CSS to center you site - How do I center my site horizontally?
|
|
|||
|
Re: page centering issues
I will buy a CSS bible, to see whether I can solve the problem. I need to center my page in both directions (not only horizontally). I found out that the (bad) way I'm using, gives me the results I want, except for this strange javascript behaviour.
|
|
||||
|
Re: page centering issues
|
|
|||
|
Since I'm not very into CSS (haven't received my bible yet
I've come up with this code in the header
and used
If so, thanks for pointing me in the right direction ! |
|
|||
|
Re: page centering issues
My god, what hideous code!
All you need is { margin: 0 auto; }. |
|
|||
|
Quote:
I ordered my CSS bible, so within no time I will understand more about the mountains and pitfalls of it. |
|
|||
|
Re: page centering issues
My mistake: you're centring vertically as well (what a weird thing to do). {margin: 0 auto } will not suffice.
|
|
||||
|
Re: page centering issues
Moving to CSS forum
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
|||
|
Re: page centering issues
I thought you where aiming at
I love to make centered pages But everything works fine now |
|
|||
|
Re: page centering issues
Yes it is. CSS did the trick, although I haven't figured out what the real problem was using the (wrong)centering way as earlier discribed. Another good thing is that centering with CSS gives good results in IE7 when the zoom function is used.
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Centering a Page In CSS | britishchampion | Web Page Design | 5 | Jan 3rd, 2008 16:20 |
| [SOLVED] Centering a layer based page for different screen sizes? | Mulith | Starting Out | 11 | Oct 31st, 2007 02:40 |
| [SOLVED] Centering an image with CSS without moving anything else on the page. | Ed | Web Page Design | 5 | Oct 29th, 2007 11:34 |
| Need Help Centering my index page??? | 0413 | Starting Out | 6 | Jun 9th, 2007 06:40 |
| Centering page question | bklcomputing | Web Page Design | 1 | May 20th, 2005 18:49 |