0

I have a problem for displaying a background in the ASP.NET form. This is my CSS code:

.intro {

    background: url(./img/bg.jpg) no-repeat center;
    background-size: 100% 100%;
    background-attachment: fixed;

}

when I use a div tag with .intro class attribute out of the ASP.NET form tag it works correctly and the Background is fullscreen:

<div class="intro">

  <h1>My Intro BG IS HERE</h1>

</div>


<form id="form1" runat="server">

  <p>My Website Content</p>

</form>
                

but when I put the div tag between the form tags, it not works... what is the problem?? thanks.

<form id="form1" runat="server">

<div class="intro">

  <h1>My Intro BG IS HERE</h1>

</div>

  <p>My Website Content</p>

</form>
                
Mahan
  • 1
  • You are targeting an element inside a form tag. try adding: form .intro {} to your css and see if that is the problem. – andrralv Oct 24 '16 at 21:17
  • Not Works.... with or without runat attribute it not works... before using asp.net (in HTML Template) it was fullscreen – Mahan Oct 24 '16 at 21:26

0 Answers0