Forum Moderators: not2easy

Message Too Old, No Replies

CSS question

         

3li4n4

6:12 am on Feb 14, 2006 (gmt 0)

10+ Year Member



Is there a way you can specify the images to be displayed in the css file? This is so I won't have to insert the same image (such as a logo) in every page. Recommendations?

alias

9:26 am on Feb 14, 2006 (gmt 0)

10+ Year Member



Yes, you can assign a background for HTML tags, try something like that:

body {
background: url(path/to/image.gif) 50% 0% no-repeat;
}

The first percent value (50%) specifies where should the image be placed on the X axis of the body tag width.
The secong percent value (0%) specifies where should the image be placed on the Y axis of the body tag height.
You can also use words in this place (top left, top right etc).

I hope that is what you want - this way you can assign an image background for any HTML tag.

Cheers,
M.Saulis

3li4n4

10:15 pm on Feb 14, 2006 (gmt 0)

10+ Year Member



I tried that. The problem with it is that i have to insert something on top so it can show up on the page.

I was looking for a way to make the image show on the page as an image not as a background. Any other ideas?

Thank you for replying.

coho75

10:25 pm on Feb 14, 2006 (gmt 0)

10+ Year Member



You could use a server side language to include a header file that includes the logo. Languages such as PHP or Perl can do this very easily. Even if you've never programmed before, the code for doing something like this is pretty simple and straight forward.

3li4n4

9:57 pm on Feb 16, 2006 (gmt 0)

10+ Year Member



Thank you, that was exactly was I was looking for. It works perfect.