Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1105
  • Last Modified:

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');
0
J C
Asked:
J C
  • 2
  • 2
1 Solution
 
ramkihardyCommented:
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now