control Icon image not displayed on swipebox

henrikjt

New Member
Hi All,

I cant figure out why the control icons are not being displayed when the image is enlarged.

The control icons are located on the icons.png image.

Please scroll down to the photo gallery to see for yourself.

On this site that has the same files on the server it is displayed correctly:

http://realimg.com/joinysc/

however, on the site which is hosted on another server with another company the control icons are not displayed.

http://joinysc.ysc.org/

here is the code:

#swipebox-action #swipebox-prev, #swipebox-action #swipebox-next,
#swipebox-action #swipebox-close {
background-image: url("../images/icons.png");
background-repeat: no-repeat;
border: none!important;
text-decoration: none!important;
cursor: pointer;
position: absolute;
width: 50px;
height: 50px;
top: 0;
}
 

chrishirst

Well-Known Member
Staff member
Your code has a relative URL with a directory qualifier (..) which means they HAVE to be in the same physical location as the document is being served from.
 

henrikjt

New Member
Your code has a relative URL with a directory qualifier (..) which means they HAVE to be in the same physical location as the document is being served from.

The image file is uploaded on both servers. Not sure if you are referring to something else?
 

chrishirst

Well-Known Member
Staff member
The image file is uploaded on both servers

Is it in EXACTLY the same location, and is directory traversal above root allowed on both servers.

../ means the directory ABOVE the web root directory has to be accessible to the site user account.
 

henrikjt

New Member
Is it in EXACTLY the same location, and is directory traversal above root allowed on both servers.

../ means the directory ABOVE the web root directory has to be accessible to the site user account.

Yep, the image is located in the same location. I uploaded the files from the same folder to each server after i found out there was a problem. I have no clue if directory traversal above root is allowed on both servers. How would i find out about that?

I appreciate the help!
 

chrishirst

Well-Known Member
Staff member
You need to check the permissions on directories above the webroot in whatever control panel your hosting uses, or a shell session, assuming *nix server and shell access is allowed.

If it is a shared hosting account, competent shared server admins (should) turn off "parent directory access" to prevent directory traversal attacks from rogue or malicious scripting.
 

henrikjt

New Member
I figured it out. I had to add !important to the css code

background-image: url("../images/icons.png")!important;
 

ronaldroe

Super Moderator
Staff member
If you had to add that, you messed up somewhere else. Your selector may not be specific enough.
 
Top