Visual Studio 2010 Web Application Template - Customizing layout/CSS

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');
J CAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ramkihardyConnect With a Mentor Commented:
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
 
J CAuthor Commented:
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
 
J CAuthor Commented:
My apologies...The path was not accurate, at least not from where the stylesheet is stored.

This worked...

url('../images/header.gif')
0
 
ramkihardyCommented:
@jleecole:
             Its k....I also done these kind of mistakes...If any other queries you may ask..me...
With regards....

0
All Courses

From novice to tech pro — start learning today.