Solved

CSS - display image

Posted on 2014-11-07
1
106 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

810 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