Solved

Visual Studio 2010 Web Application Template - Customizing layout/CSS

Posted on 2011-02-23
4
1,069 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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