468,505 Members | 1,714 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

Centering a site

Hi,

as described at http://www.quirksmode.org/css/centering.html, I try to do
to centering with my site. I did exactly as told on that page but it only
seems to center horizontally.

My site is at http://www.up-2-d8.de/menu.html

Can you please take a look and see whether you can find anything I am
doing wrong?!

Best regards,
Axel Siebenwirth

Jul 21 '05 #1
6 1870
Axel Siebenwirth wrote:
Hi,

as described at http://www.quirksmode.org/css/centering.html, I try to do
to centering with my site. I did exactly as told on that page but it only
seems to center horizontally.

My site is at http://www.up-2-d8.de/menu.html

Can you please take a look and see whether you can find anything I am
doing wrong?!

Best regards,
Axel Siebenwirth

your doctype is the fly in your soup

Jul 21 '05 #2
On Thu, 17 Mar 2005 15:05:30 +0100, Martin! wrote:
Axel Siebenwirth wrote:
Hi,

as described at http://www.quirksmode.org/css/centering.html, I try to do
to centering with my site. I did exactly as told on that page but it only
seems to center horizontally.

My site is at http://www.up-2-d8.de/menu.html

Can you please take a look and see whether you can find anything I am
doing wrong?!

Best regards,
Axel Siebenwirth

your doctype is the fly in your soup


Can explain this a little further to me, please?

Regards,
Axel
Jul 21 '05 #3
Axel Siebenwirth wrote:
On Thu, 17 Mar 2005 15:05:30 +0100, Martin! wrote:

Axel Siebenwirth wrote:

Hi,

as described at http://www.quirksmode.org/css/centering.html, I try to do
to centering with my site. I did exactly as told on that page but it only
seems to center horizontally.

My site is at http://www.up-2-d8.de/menu.html

Can you please take a look and see whether you can find anything I am
doing wrong?!

Best regards,
Axel Siebenwirth

your doctype is the fly in your soup

Can explain this a little further to me, please?

Regards,
Axel


i would if i could :)

just checked your code, seems perfectly ok with your example
except that the example (of quirksmode.org) doesnt use a doctype and
your do. removing your doctype removes your problem (but probably adds
amany new)

another way to center a block with a fixed with is:

div.container {
position: absolute;
width: 800px;
height: 600px;
top: 50%;
left: 50%;
margin-left: -400px;
margin-top: -300px;
}
gl
martin
Jul 21 '05 #4
Martin! wrote:

another way to center a block with a fixed with is:

div.container {
position: absolute;
width: 800px;
height: 600px;
top: 50%;
left: 50%;
margin-left: -400px;
margin-top: -300px;
}


This may work if you don't care what happens with a viewport smaller
than the specified div dimensions, or if the content doesn't contain any
text. Use with extreme caution.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #5
On Thu, 17 Mar 2005 15:20:05 +0100, Martin! wrote:
Axel Siebenwirth wrote:
On Thu, 17 Mar 2005 15:05:30 +0100, Martin! wrote:

Axel Siebenwirth wrote:
Hi,

as described at http://www.quirksmode.org/css/centering.html, I try to do
to centering with my site. I did exactly as told on that page but it only
seems to center horizontally.

My site is at http://www.up-2-d8.de/menu.html

Can you please take a look and see whether you can find anything I am
doing wrong?!

Best regards,
Axel Siebenwirth

your doctype is the fly in your soup

Can explain this a little further to me, please?

Regards,
Axel


i would if i could :)

just checked your code, seems perfectly ok with your example
except that the example (of quirksmode.org) doesnt use a doctype and
your do. removing your doctype removes your problem (but probably adds
amany new)


But why that??? I have even tried using a HTML 4.01 transitional DTD. That
doesnt work either. Only leaving it out the DTD works at all.
Very strange?
Does somebody have deeper knowledge about the impact of using a DTD and
why it could f**k up my CSS centering?

Best regards,
Axel

Jul 21 '05 #6
Axel Siebenwirth wrote:
But why that??? I have even tried using a HTML 4.01 transitional DTD. That
doesnt work either. Only leaving it out the DTD works at all.


With certain DTDs present you trigger standards mode. This causes the
browser[1] to follow the CSS specification more closely. Taking it out
causes the browser to emulate the bugs of older browsers so as to avoid
breaking sites which depend on those bugs.

Continuing to depend on them is unwise for forwards compatibility, so you
are probably best off leaving your DTD in place and finding a way to
achieve the effect with real CSS, or changing the design.

[1] Your browser that is. Not all browsers have Quirks mode.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Erik Schulp | last post: by
4 posts views Thread by Lance Hoffmeyer | last post: by
3 posts views Thread by John Pote | last post: by
5 posts views Thread by Markus Ernst | last post: by
reply views Thread by NPC403 | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.