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.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Junior Member
    Join Date
    Jun 2007
    Posts
    10
    Member #
    15351
    I added a background image to a site I'm creating but it doesn't show up. I have created backgrounds in the past and I did it the same way so I'm not sure what is wrong.
    Here is what I am using for code:
    body{
    margin:0;
    font: 12px/20px Verdana, Arial, serif;
    background: url(bck.jpg)no-repeat;
    color:#ffffff;
    text-align: center;
    padding-left: 0px;
    }
    I also have other graphics on the site (on the html side) so I don't know if one of those codes is overwriting this one if that is even possible.
    I don't know if this is enough information for anyone to help me so let me know if I need to give more details.
    Thanks!

  2.  

  3. #2
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    Do you have a link that we could look at?
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  4. #3
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    Yeah ... a link would be better so we can actually see what's going wrong
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  5. #4
    Senior Member Ferro's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    386
    Member #
    14204
    Liked
    5 times
    Are you sure it's pointing to the right location for the image inside the url bit? That's usually where I go wrong......if I keep my css files within "inc/css" I often forget to put the "../../" before the pic file location for example.....

  6. #5
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    bck.jpg or back.jpg?
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  7. #6
    Junior Member
    Join Date
    Jun 2007
    Posts
    10
    Member #
    15351
    Here is the link:
    http://www.rcsts-designs.com/img/
    I am pretty sure I am pointing the url to the right place.
    The image is named bck.jpg (same as I did with other backgrounds I created) so I don't know if that would be the issue but I will rename it back.jpg and see.

  8. #7
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    found the problem theres something wrong in your background entry for body change it for this url(../bck.jpg) no-repeat and add the scroll etc in background-scroll
    Regards Phil,


  9. #8
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    just add url(../bck.jpg) and it should work
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  10. #9
    Junior Member
    Join Date
    Jun 2007
    Posts
    10
    Member #
    15351
    I tried that before and it didn't work but I tried it again just now for good measure and it still doesn't work. I also tried putting the picture in the images folder and using url(../images/bck.jpg)no-repeat; still no luck.

  11. #10
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    It works OK on FireFox, but not IE.

    I think the problem is in here:

    body{
    margin:0;
    font: 12px/20px Verdana, Arial, serif;
    background: url(../images/bck.jpg)no-repeat;
    color:#ffffff;
    text-align: center;
    padding-left: 0px;
    position:relative;
    }


    Comment out the old (so you don't lose anything) and try
    something different ... like this:

    /*
    body{
    margin:0;
    font: 12px/20px Verdana, Arial, serif;
    background: url(../images/bck.jpg)no-repeat;
    color:#ffffff;
    text-align: center;
    padding-left: 0px;
    position:relative;
    }
    */
    html, body{
    background: url(../images/bck.jpg) no-repeat;
    margin:0px auto;
    width: 1024px;
    font: 12px/20px Verdana, Arial, serif;
    color:#ffffff;
    text-align: center;
    }


    I didn't actually try it out myself, but I think you'll discover that since
    you didn't specify a body width, the background image is actually there ...
    it's just underneath the other images (not placed where you want).

    By making a body width wider than the content (and wrapper), you should
    now see the image in the upper left corner.



Page 1 of 2 1 2 LastLast

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 03:07 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com