Eric
Eric

Reputation: 705

Learning CSS, how to use stylesheet with master page

I'm trying to learn to use stylesheets. I have build several websites, but never used stylesheets.

My first try is to repeat an image at the top of the page to create some kind of header. So I have created a stylesheet that looks like:

body {
  width: 100%;
  background-image: url('../images/MasterPageHead.png');
  background-repeat: repeat-x;
  background-color: #FFFFFF;
}

Now on my master page, I have added the line:

<link href="CSS/MasterPage.css" rel="stylesheet" />

The body of my master page looks like this:

<body>
  <form id="form1" runat="server" >
    <div>
      <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

      </asp:ContentPlaceHolder>
    </div>
  </form>
</body>

Now how can I show this image at the top of the page?

rg, Eric

Upvotes: 0

Views: 902

Answers (1)

Morfie
Morfie

Reputation: 670

Make sure there is something inside the page to give it a height, or specify a min-height inside your current body CSS rule.

Upvotes: 1

Related Questions