Solved

Visual Studio 2010 Web Application Template - Customizing layout/CSS

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
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 …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 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