Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Member frazzle's Avatar
    Join Date
    Jun 2005
    Location
    Glasgow, Scotland
    Posts
    39
    Member #
    10256
    Hi, wondering if someone could perhaps help. I'm working on a website for a friend's dog grooming business and I'm having a small problem. On my content div I would like to have a different image for each page.

    The site will have about 10 pages so one way I could do it is have a style sheet for each page but that just seems pointless.

    Is there a way I can specify this for each page in 1 style sheet?

    Here is the CSS For the content div at present:

    Code:
    #content {
    width: 530px;
    margin: 10px;
    text-align: justify;
    padding-right: 10px;
    padding-left: 35px;
    margin-top: 10px;
    background: #fff url("images/side_dog.png") no-repeat;
    }
    Heres a link to the site in its presnt state.
    http://www.roughcutreviews.com/woofcuts/

    Its the only page thats up. Where that dog appears at the bottom right I want to have a different image for each page.

    Thanks in Advance!
    Rough Cut Reviews - http://www.roughcutreviews.com

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Well, one way would be to change your background url value to reside in the same directory as the file. So all files would be called the same however the actual image would be of something different.

    For instance lets take this website

    /root
    index.html
    side_dog.png
    -> /foo
    --> index.html
    --> side_dog.png
    -> /bar
    --> index.html
    --> side_dog.png

    So in your style sheet you would do something like

    Code:
    background: #fff url("side_dog.png") no-repeat;
    So now your page will use a relative image to whatever directory is being viewed.

    The downisde is the filename will not indicate what the image is, and they will have to have the same dimensions.

  4. #3
    Member frazzle's Avatar
    Join Date
    Jun 2005
    Location
    Glasgow, Scotland
    Posts
    39
    Member #
    10256
    Thanks! I'll give this a try. Some of the images were gonna be different dimensions but I can probably sort that!!
    Rough Cut Reviews - http://www.roughcutreviews.com


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com