| 7:10 am on May 9, 2003 (gmt 0)|
One way, among many, would be just to set a margin on either the paragraphs, headings and lists themselves or on a containing div like this:
| 12:08 pm on May 9, 2003 (gmt 0)|
Setting the margins doesn't work because I don't know how wide the page is... I want approximately ten words to a line (something like a normal book). 40em seems to be roughly right, at least with most fonts, but with small windows or displays (800 pixels or less) I need the whole screen, with only small margins, but with 1024 or larger the margins have to be bigger.
| 12:34 pm on May 9, 2003 (gmt 0)|
So why not just center a 40em div and put your content in that?
margin: 0 auto;
| 5:49 pm on May 9, 2003 (gmt 0)|
Will the width be different depending on screen resolution?
If so, something like this would work:
Just replace the pixel values with whatever works.
123px = default (up to 800×600 resolution)
234px = more than 800×600, but less than 1024×768
345px = anything above 1024×768
| 2:33 am on May 11, 2003 (gmt 0)|
grahamstewart: Doh! That works fine.
Now I just need to work out how to fix things in NN4. I need to align a column of text in the middle of the page, but while keeping it left-aligned... At the moment the page looks better in Netscape 3 (with no CSS) than in Netscape 4 :-)