Thierry Koblentz wrote:
In the CSS box model, are background images understood to occupy
the
same height and width as the outer edge of the border area?

I believe it is the border box (content + padding + border)
No, the default is the padding-box:

Thanks Philippe,
In my mind we're talking background, not just background images.
The background-color is painted in the border box, but yes it would not make
much sense to have the background-image within the same boundaries.


It's the initial (default) background-position of background-image that use the padding box as a reference (starting point of the x and y axis). In 14.2.1 for background-position it has:

 <percentage>
   A percentage X aligns the point X% across (for horizontal) or
   down (for vertical) the image with the point X% across (for
   horizontal) or down (for vertical) the element's padding box.

 <length>
   A length L aligns the top left corner of the image a distance
   L to the right of (for horizontal) or below (for vertical) the
   top left corner of the element's padding box.


If the background-image has background-repeat as 'repeat', then the image is tiled to cover the full border box. If background-repeat has 'no-repeat' and the length is given as a minus value (equaling the width of the border), then the image top left corner will be positioned at the top left corner of the border box.


.box {
  background-image: url(image.png);
  border: 20px dashed blue;
  background-position: -20px -20px;
}




--
Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
______________________________________________________________________
css-discuss [cs...@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