Solved

Visual Studio 2010 Web Application Template - Customizing layout/CSS

Posted on 2011-02-23
4
1,049 Views
Last Modified: 2012-05-11
I tried adding a background image to the header. The image does not display. Does anyone know why that may be?

Here is the CSS:

.header
{
    position: relative;
    margin: 0px;
    padding: 0px;
    width: 100%;
    background-image: url('images/header.gif');
0
Comment
Question by:J C
  • 2
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
ramkihardy earned 500 total points
ID: 34967369
please make sure that you have given the name of the css class in the style property of the control...... and also look that you have given the correct location of the image file...and also try by changing the location of the gif file...or you may try by directly selecting the image from the property window...and check that your image is displaying or not....

with regards......
0
 

Author Comment

by:J C
ID: 34967384
If I hard code the image into one of the web pages, it displays just fine using that url/path to the image.

Here is the code used in the Site.Master where the header is concerned. The class is defined.

 <div class="header">
            <div class="loginDisplay">
                <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
                    <AnonymousTemplate>
                        [ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
                    </AnonymousTemplate>
                    <LoggedInTemplate>
                        Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
                        [ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
                    </LoggedInTemplate>
                </asp:LoginView>
            </div>
0
 

Author Comment

by:J C
ID: 34967861
My apologies...The path was not accurate, at least not from where the stylesheet is stored.

This worked...

url('../images/header.gif')
0
 
LVL 2

Expert Comment

by:ramkihardy
ID: 34968074
@jleecole:
             Its k....I also done these kind of mistakes...If any other queries you may ask..me...
With regards....

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

20 Experts available now in Live!

Get 1:1 Help Now