On Sat, 02 Oct 2004 16:16:43 +1000, Neerav <[EMAIL PROTECTED]> wrote:
> Im experimenting with some techniques from dan cederholms book "Web
> Standards Solutions" and found that setting a background image like so
> 
> h1 , h2 , h3 , h4 , h5
> {
>    text-align : left;
>    padding-bottom: 14px;
>    background: url(/img/under_heading.gif) repeat-x bottom;
> }
> 
> caused the background image to continue across the whole container div
> width, my guess is that this occurs because Hx tags are BLOCK elements,

"repeat-x" makes the background image repeat across the whole width
and by default <h> elements are 100% wide. Replacing it with
"no-repeat" would ensure only one copy of the image appears. E.g. see
<http://www.w3schools.com/css/pr_background.asp>

James

PS: "inline" worked because it made the heading shrink-wrap but you
were probably lucky that it remained on a line of its own. I guess it
was surrounded by other block elements.
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to