June 2, 201214 yr The file index.php is formatted by means the file style.css which is inside the folder css. All works fine except that there are two images on the css that I can´t manage them to be rendered. The folders where the files are placed are the following : root. . . - php [index.php] - css [style.css] - images [image1.png , image2.png] . . This is part of css just to illustrate : input.button {cursor: pointer; border: none; font-weight: bold; background: url(../images/image1.png) no-repeat left top; width: 90px; height: 28px; margin-left: 150px; } For the sake of a test I´ve pasted inside the css folder both images and removed the relative path changing background: url(../images/image1.png) by background: url(image1.png). As I expected it worked , images are visualizaed , what proves that the problem is on the path. If I understood properly two dots and a slash mean go up one level : ../ In this case between folder css and images there is one level. So why the images do not appear ? what is wrong ?
June 2, 201214 yr Have you tried to use background-image? This maybe solves the problem input.button { background-image: url(../images/titel.jpg); }
June 2, 201214 yr Should work, you sure it's not a typo? Or if you're on a web server, you sure the images are in the right place? If you only have one stylesheet, I don't see a need for a css dir, just put it root and you don't have to worry about ../, I keep my style.css in the root folder anyway. ~evu.
June 2, 201214 yr Author 1- Have you tried to use background-image? as posted below it is already this way a background-image. 2- ... sure it's not a typo? / sure the images are in the right place? / keep the css in the root Nope , I checked and rechecked , all seems fine : the images are in the folder "images" / I like to separate css , images , php , js , etc. SOLVED : simply I deleted all files on the server and reuploaded then it worked Thank you all very much for your answer
Create an account or sign in to comment