Solved

asp.net css image could not be display

Posted on 2011-02-15
3
903 Views
Last Modified: 2012-05-11
trying to display image from css file ,

 cssfilepath
aspx
----
<head id="Head1" runat="server">
<link rel="stylesheet" href="Images/Css/gray.css" type="text/css" />

gray.css
--------
.mainpic
{
	background:url('../Images/Home/mainpic.gif');
	background-repeat:no-repeat;
}

Open in new window

0
Comment
Question by:doramail05
  • 2
3 Comments
 
LVL 10

Expert Comment

by:hosneylk
ID: 34903448
try this instead
background-image: url(../Images/Home/mainpic.gif);

Open in new window

0
 
LVL 1

Accepted Solution

by:
doramail05 earned 0 total points
ID: 34903466
resolved :

../../Images/Home/mainpic.gif
0
 
LVL 1

Author Closing Comment

by:doramail05
ID: 34936613
changed the relative path
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
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…
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…

777 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