473,569 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2028
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2579
by: Erik Schulp | last post by:
Hi all, I am trying to get a CSS defined layout to center on the page, have tried doing this with the <center></center> tags but than everything is centered, including text etc etc. What should I put into the stylesheet so that, no matter what resolution the viewer's screen is set to, the layout is always displayed centered ? Erik Schulp
5
2636
by: Robert J. O'Hara | last post by:
For some time I've made use of the max-width property in CSS to cause my pages to appear as a centered block against a contrasting background. This works well in new browsers (Mozilla, etc.) and falls back fine in IE6 and lesser creations. As one who practices "classic" (i.e. dull) typography, this has always been satisfactory since I've...
4
1597
by: Paolo | last post by:
I would like to have it so that my webpages, which are built using MasterPages, always appear in the center of the browser of the user, even if he resizes the browser window. As a starting point, when creating the Masterpage, this is the generated html: <body> <form id="form1" runat="server"> <div>
4
6848
by: Lance Hoffmeyer | last post by:
Hey all, Having problems centering a column Can someone explain how to center a column using python? import win32com.client import re import codecs
3
4192
by: John Pote | last post by:
1. Horizontal centering a <divin browser window. The current trend seems to be to place page content in a fixed width area in the middle of the browser window. How is this achieved? If I use a top level <divthen I can place it with CSS attribute 'left:', but this is a fixed offset. Is it possible to have a <divcentered in the browser window?...
8
4227
by: speralta | last post by:
I'm playing around with a test page that uses a <div id="main"within the context of a body with a width of 100% to center a fixed width field on a page. For some reason, the page is not centering in Internet Explorer. What's odd is that it works on my site's home page and most other pages, but not on pages that I am returning from a...
5
4810
by: Markus Ernst | last post by:
Hello This is a test example: http://www.markusernst.ch/anthracite/ http://www.markusernst.ch/anthracite/living_divani.html After googling and experimenting for several hours, I ended up doing this demo with tables. The main problems are the vertical centering of the info area, and of the text inside the squares.
2
3031
by: rudicheow | last post by:
SHORT VERSION ============= I have a bunch of identical fixed-size single-celled tables that rest against each other horizontally thanks to "float:left". These tables are dynamically generated and the number of them can vary greatly. They are all contained within a parent table cell, which is centred on the page. But I am unable to find a...
11
2003
by: Cartoper | last post by:
Here is the code: http://cartoper.ueuo.com/centering.htm How do I get the big blue buttons to center themselves on Firefox and Safari on this web site? I know that the layout is a bit complex, but there is a reason for it, have a look at this site:
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7921
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.