How do you repeat a background image in a header?

2 replies
  • WEB DESIGN
  • |
It's easy enough to get a repeating background image in the body, but how do you do it in the header or a sidebar? I've tried a few things but can't seem to get it to work. One html/css site said it could be done in almost any part of a site just before they started talking about another topic. (snarl)

(We do need a nice set of snarlies to help balance out all the #^*&ing smilies around. If they are just a bit cute they would probably catch on really fast. Anybody enjoy graphics?)

Or do you know of a site that uses a gradient image for their header or nav bar? I would just like to look at the source code to see how it is done. I do know of one that uses an image to back the sidebar but maybe because it is a cold fusion site I can't see how it is done. (contactinfo.net)

sincerely,
(and truly) baffled
#background #header #image #repeat
  • Profile picture of the author mojojuju
    Edit your CSS for the div for which you would like to tile the background image like this:

    Code:
    background-image:url(http://www.example.com/path/to/your/image/gradient.png);background-repeat:repeat-x;
    This assumes that you want the image to tile horizontally. If you want a vertical tile, just replace "repeat-x" with "repeat-y".
    Signature

    :)

    {{ DiscussionBoard.errors[798097].message }}
  • Profile picture of the author Lloyd Buchinski
    Thanks. That looks good and I expect it is right. I had found that and tried it before but couldn't get it to work so I thought I must be missing something. Have tried it about 6 times since you put it up, same result.

    Now I'm going to try a double rum and a day off. When my error rate starts climbing that's a clue for me. I expect there is a problem in the head or a colon where there should be a semi colon or something like that and I'll start with a new sheet when I get back to it.

    Thanks again.
    Signature

    Do something spectacular; be fulfilled. Then you can be your own hero. Prem Rawat

    The KimW WSO

    {{ DiscussionBoard.errors[799300].message }}

Trending Topics