Click to See Complete Forum and Search --> : Image rendering problem


no/good/at/this
11-11-2008, 11:33 AM
Hi, i dont think im doing this wrong, however i cannot get any of my images to render from css, this is the code.

#right_top_box
{background:url(right_top_box.gif) no-repeat;}

To me thats looks fine but it wont work, ive tried linking directly from my server html directory and ive also tried linking from a folder, ie putting all my images into a seperate folder and linking to that.

However the only way i can get it to work is to do this:

<div id="right_top_box"><img src="left_top_box.gif" alt=""/></div>


#right_top_box
{background:url(right_top_box.gif) no-repeat;}

As you can see i have to put the image link into the html page as well as the css page in order for it to render, but the image is a background so it should render from the css, shouldn't it?
Am i doing it wrong? as i dont think i am
thanks.

jasonahoule
11-11-2008, 12:18 PM
Looks okay to me. Are you sure that the image path is correct?

no/good/at/this
11-11-2008, 12:22 PM
Absolutely, its really wierd coz the site logo will render fine on all pages without probs and the mouseover image for that is fine too, its just page content images won't render in css alone, its drving me mad as i know im doing it right, ive tried

{background-image: blah;}

as well as the code ive already posted and unless i put it in both html and css it wont render.
I'm really stumped

tracknut
11-11-2008, 12:24 PM
Is there any chance there is no content in #right_top_box, and its size is 0px?

Dave

no/good/at/this
11-11-2008, 12:31 PM
Ah i think i know what you mean ie no content so no background for it?
Il try that then come back in and let ya know.

no/good/at/this
11-11-2008, 12:36 PM
Hi again no that didn't work either

no/good/at/this
11-11-2008, 12:41 PM
Scratch that you rock! it did work i had spelt height wrong so the image didnt show, thanks very much thats been driving me nuts

tracknut
11-11-2008, 12:43 PM
Awesome ;)