Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Changing Background images in ccs


  • Please log in to reply
2 replies to this topic

#1 billybonzo

billybonzo

  • Members
  • 40 posts
  • OFFLINE
  •  
  • Local time:06:02 AM

Posted 08 October 2008 - 07:56 AM

Afternoon all, im attempting to change the background image of my website and being a bit of a novice, im struggling. I have downlaoded a free background image which is in Jpg format and around 5kb. The original image is around 55kb and a Gif. I have altered the code in the css style sheet to correspond with the new image and all im getting is the background colour, but no image. What to do ?

Cheers Dave

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:11:02 PM

Posted 10 October 2008 - 08:38 PM

It would be incredibly helpful if we didn't have to guess about what your code looked like. Care to share so that we can maybe help?

#3 webrat

webrat

  • Members
  • 138 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:UK
  • Local time:06:02 AM

Posted 23 October 2008 - 09:06 AM

It depends on a number of things but I'll try and help:

1. Is the image in the correct folder? e.g if your web folder is named 'website' and you have a seperate image folder in that called 'images' you need to point the url at that folder, the CSS would be something like:

[codebox]#whateveryourelementnameis {

background: url("images/mypic.jpg");

}[/codebox]

2. Make sure your file extension .gif .jpg etc is the right one. Sounds obvious but its an easy mistake to make. Delete the other one or stash it somewhere else.

3. Check the syntax. Any missing brackets or spaces where there should not be any? Another easy mistake.

4. Make sure the codeblock above the one you are working on hasn't been tampered with acidentally. The page won't render properly.

It may not be much use but here's hoping :-)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users