Home › Forums › CSS › All images not showing up › Re: All images not showing up
You are right, your html file reads the css but unable to display the images. Thats because in css, you can’t have more than one id (#hometopbg) with the same name. If you use in that case the file will read the last line i.e line marked bold.
#hometopbg { border: 1px solid #FF80FF; background: #000000 url(images/hometopbg.jpg) }
#hometopbg { border: 1px solid #FF80FF; background: #000000 url(‘images/hometopbg.jpg’) }
#hometopbg { border: 1px solid #FF80FF; background: #000000 url("images/hometopbg.jpg") }
#hometopbg { border: 1px solid #FF80FF; background: #000000 url(/images/hometopbg.jpg) }
#hometopbg { border: 1px solid #FF80FF; background: #000000 url(‘/images/hometopbg.jpg’) }
#hometopbg { border: 1px solid #FF80FF; background: #000000 url("/images/hometopbg.jpg") }
As your file reads the last line, lets get into this and remove the slash from image url. So the final line will be:
#hometopbg { border: 1px solid #FF80FF; background: #000000 url(‘images/hometopbg.jpg’) }
Test it and see the result.
Cheers!!! :)