daytona10 Posted September 6, 2011 Share Posted September 6, 2011 Hey everyone, I'm having problem with this css code. background-image:url('images/bullets.png') basically the background I am trying to attempt is in a folder in the root folder called images, and the actual name ofthe images is bullets.png. I am positive that is the correct name as I looked at it and compared about 10 times to make sure I wasn't going crazy, but for some reason it will not show up at all! Am I linking to it wrong? Link to comment Share on other sites More sharing options...
mgason Posted September 6, 2011 Share Posted September 6, 2011 IF your css file is in the root then that is correctyou need a semi-colon on the end of thatAlso you may have issues if the png is 8 bit, but you should still get something.what are you adding the background to?maybe post a bit more code? background-image:url('images/bullets.png'); Link to comment Share on other sites More sharing options...
daytona10 Posted September 6, 2011 Author Share Posted September 6, 2011 IF your css file is in the root then that is correctyou need a semi-colon on the end of thatAlso you may have issues if the png is 8 bit, but you should still get something.what are you adding the background to?maybe post a bit more code?background-image:url('images/bullets.png'); oh yeah I forgot to copy the ; but actually the css is within a folder called style, I think that is the problem...is there any way for the css to stay within the style folder but grab the image from the other image folder?**EDIT forgot to add, I was trying to change the number in nivoslider to bullets, and I have an picture of some bullets here the full code for that section..nivo-controlNav a { position:relative; z-index:9; cursor:pointer; background-image:url('images/bullets.png') no-repeat; width:22px; height:22px; margin-right:3px; } Link to comment Share on other sites More sharing options...
nielcleo Posted September 6, 2011 Share Posted September 6, 2011 if the folder structure is like thisROOT FILE:style folderimages folderindexthen try to use this .nivo-controlNav a {position:relative;z-index:9;cursor:pointer;background-image:url('../images/bullets.png') no-repeat;width:22px;height:22px;margin-right:3px;} EDIT: using this ../ helps u to get back in the root to get file in the root.. Link to comment Share on other sites More sharing options...
daytona10 Posted September 6, 2011 Author Share Posted September 6, 2011 if the folder structure is like thisROOT FILE:style folderimages folderindexthen try to use this .nivo-controlNav a {position:relative;z-index:9;cursor:pointer;background-image:url('../images/bullets.png') no-repeat;width:22px;height:22px;margin-right:3px;} EDIT: using this ../ helps u to get back in the root to get file in the root.. duh, how could I miss this! thanks a lot! Link to comment Share on other sites More sharing options...
thescientist Posted September 6, 2011 Share Posted September 6, 2011 ../ --> just goes up one level./ --> will start you at the root.The problem was with the location of the stylesheet relative to the image. To always start from the root, you could do /images/bullets.png Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.