When defining background-image in external style sheet, it's url path is with reference to the stylesheet itself. Can the reference be changed to the document it applied?
The story is that there are several categories in my pages, each category has its own directory. In each category there will be a heading which uses background-image, these background-images use the same name (e.g. top.jpg), but different pictures. placed within their corresponding diretory. So I'm thinking if there is a way to let the background-image code place in the style sheet, not within the HTML code.
background-image url reference
Hi,
Probably the easiest way around this is to put the heading style rule in the head of each page that needs a different image. (assuming that all the directory structures are the same).
Or set up a class for each different heading with the different images defined etc and put that in your external stylesheet.
Paul
background-image url reference
That's what I do now, by adding inline style into the heading elements.
Using different class is a good idea, so that I can put all my images into one folder, but using different names. Thank u.