W3C home > Mailing lists > Public > www-style@w3.org > February 2002

Why doesn't paragraph background/border flow to same size?

From: Peter Sheerin <pete@petesguide.com>
Date: Tue, 19 Feb 2002 15:09:04 -0800
Message-ID: <005401c1b99a$6dfa8000$8810960a@cadpkslaptop>
To: <www-style@w3.org>
I'm trying to figure out how to make a class of paragraph appear how I would expect it to, rather than how it is displayed in all the browsers I've tested it with. I have a class that applies a background and border to a paragraph, but when this is done and the paragraph is squished between two objects that float on either side, the background and border are laid under the two floated objects, even though the paragraph itself is wrapped correctly.

Is this behavior as it was designed? If so, why, and how would I specify the formatting I'm expecting (that the background appear only underneath the actual paragraph, and the border only at its edges, rather than the full width of its containing block)?

Or is it not possible, and thus something to be brought up in the CSS3 discussions?

page: http://www.pushback.com/terror/mines/SMIL.html

relevant CSS code:

font-size: 10pt;
border: 2px dashed red;
background-color: cyan;
width: auto}
Received on Tuesday, 19 February 2002 18:10:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:00 UTC