The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

images not showing up in css

Discussion in 'General Discussion' started by dyr, Apr 27, 2012.

  1. dyr

    dyr Registered

    Joined:
    Apr 27, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hi, I'm converting my code from my localhost (XAMPP) to Cpanel. The css code I have below works fine on XAMPP, but when I put it on my cpanel it does not show up. Note this image is on top of the main banner. The main banner shows up. Any ideas? The nav.png and banner.png are in the same place, and when I type out their URL's, both images show up so loading is not the problem.

    PHP:
    ul#topnav {
    position:relative;
    top:235px;
    right:5px;
    width:963px;
    list-
    style:none;
    height:36px;
    margin:0;
    }
    ul#topnav li {
    display:inline;
    }

    ul#topnav li a {
    height:36px;
    float:left;
    text-indent:-9999px;
    }

    ul#topnav li#topnav-1 a {
    width:106px;
    background:url(/nav.pngno-repeat 0 0/* X and Y position at 0 */
    }
    ul#topnav  li#topnav-1 a:hover {
    background-position:-42px/* Y position -40px for Over instance image */
    }
    ul#topnav  li#topnav-1 a.current {
    background-position:-84px/* Y position -80px for Current instance image */
    }

    ul#topnav li#topnav-2 a {
    width:107px;
    background:url(./nav.pngno-repeat -106px 0;
    }
    ul#topnav  li#topnav-2 a:hover {
    background-position:-106px -42px;
    }
    ul#topnav  li#topnav-2 a.current {
    background-position:-106px -84px;
    }
    ul#topnav li#topnav-3 a {
    width:135px;
    background:url(/nav.pngno-repeat -213px 0;
    }
    ul#topnav  li#topnav-3 a:hover {
    background-position:-213px -42px;
    }
    ul#topnav  li#topnav-3 a.current {
    background-position:-213px -84px;
    }
    ul#topnav li#topnav-4 a {
    width:197px;
    background:url(/nav.pngno-repeat -348px 0;
    }
    ul#topnav  li#topnav-4 a:hover {
    background-position:-348px -42px;
    }
    ul#topnav  li#topnav-4 a.current {
    background-position:-348px -84px;
    }
    ul#topnav li#topnav-5 a {
    width:112px;
    background:url(/nav.pngno-repeat -545px 0;
    }
    ul#topnav  li#topnav-5 a:hover {
    background-position:-545px -42px;
    }
    ul#topnav  li#topnav-5 a.current {
    background-position:-545px -84px;
    }
    ul#topnav li#topnav-6 a {
    width:120px;
    background:url(/nav.pngno-repeat -657px 0;
    }
    ul#topnav  li#topnav-6 a:hover {
    background-position:-657px -42px;
    }
    ul#topnav  li#topnav-6 a.current {
    background-position:-657px -84px;
    }
    ul#topnav li#topnav-7 a {
    width:107px;
    background:url(/nav.pngno-repeat -777px 0;
    }
    ul#topnav  li#topnav-7 a:hover {
    background-position:-777px -42px;
    }
    ul#topnav  li#topnav-7 a.current {
    background-position:-777px -84px;
    }
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    194
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    What directory are you placing this CSS file? Certainly it needs to be in the same directory as the rest of your site.

    There is nothing in that CSS file that could be helpful here for your problem. No URLs etc.
     
  3. dyr

    dyr Registered

    Joined:
    Apr 27, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hmm, now it seems to work. So I suppose it just needs a refresh of the cache or something to get new images to show.
     
    #3 dyr, Apr 28, 2012
    Last edited: Apr 28, 2012
Loading...

Share This Page