thanks James you have confirmed my suspicion that "by default <h> elements are 100% wide"

everyone else, thanks for the suggestions. I only had it set on "inline" for a few minutes anyway as i knew it was not the best method, and I know that "As soon as you convert something to inline you allow other inline elements to run up beside it"

I think I like the effect of the image across the page anyway, so in the end no changes are needed :-)

I see that i didnt link to my experiment in the question so heres the URL http://www.bhatt.id.au/blog/

Neerav Bhatt
http://www.bhatt.id.au
Web Development & IT consultancy
Mobile: +61 (0)403 8000 27

http://www.bhatt.id.au/blog/ - Ramblings Thoughts
http://www.bookcrossing.com/mybookshelf/neerav

James Denholm-Price wrote:
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
******************************************************
******************************************************
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