473,785 Members | 2,440 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 2035
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
2589
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
2649
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 always used one-column pages. I'm now trying a two column layout so I can include a sidebar, and am...
4
1606
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
6865
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
4213
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? 2. Verticle centering in <div>
8
4242
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 particular script. I've stripped out most of the content in an attempt to sort it out, but after kicking...
5
4826
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
3063
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 way of centering these table cells within the parent cell.
11
2029
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
9647
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9489
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10357
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6744
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2893
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.