Robin Chapple wrote:

How do I set a width limit for anything that appears on a page.

Do you mean setting a width limit, or setting width?

I tries this which does not work:

body {
[...]
width: 800px
}

That's setting the width. To set the width limit, use max-width instead.

What do you mean by "does not work"? Post a URL, please. There are dozens of things that might make browsers ignore some CSS settings.

If you mean exceeding the 800px width a bit, then that's probably due to default margin or padding for <html> or <body>. You need to set them too if you want to be pixel-exact.

Content that cannot possibly fit into the specified width or max-width will overflow. Handling of overflow depends on CSS settings and on the browser.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to