Solved

CSS - display image

Posted on 2014-11-07
1
105 Views
Last Modified: 2014-11-25
When I use code below on #2 it works on just my local machine. When I tried to use #1, my logo does not get display?
What should I do? This is my logo location in VS2010

Images folder
      logo.gif
     


# 1


div.hideCustlink
{
    background-color:#4d8f75;
    width:100%;
    height: 56px;
    background-position: left;
    border: thin solid #4d8f75;
    background-image: url('/logo.gif');
    background-repeat: no-repeat;
}


     
 #2  
   
   div.hideSkiplink
{
    background-color:#4d8f75;
    width:100%;
    height: 56px;
    background-position: left;
    border: thin solid #4d8f75;
    background-image: url('http://localhost:64396/report/Images/logo.gif');
    background-repeat: no-repeat;
}
0
Comment
Question by:VBdotnet2005
1 Comment
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 40429451
Yeah well it can't resolve the path back to the server root and the image is not in a folder below the folder with the page.

You either need to put the image in the same folder as the page or put it in a folder that that be referenced from the server root with ../report/images/logo.gif or ../images/logo.gif

Cd&
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now