I am facing a rather straightforward issue that requires resolution. I am currently working on fixing a background div (
<div class="main-background">
) that contains an image on my webpage. While it displays correctly in Design View in Visual Studio, it fails to appear when I run the application. The other elements on the page are visible, so I am unsure why this specific background div is not showing. Can anyone guide me on what might be causing this problem?
<div class="main-background">
<div class="center">
<asp:Panel ID="pnlOptions" runat="server" BackColor="#669999" HorizontalAlign="Center" Height="55px" Width="607px" BorderStyle="Double">
<div style="vertical-align: top">
<asp:Label ID="lblAvailableOptions" runat="server" Text="Available Options" Font-Size="X-Large" Font-Bold="True" ForeColor="Black" Font-Names="Trebuchet MS" Style="vertical-align: bottom"></asp:Label>
</div>
</asp:Panel>
</div>
<br />
<br />
<br />
<asp:Panel ID="pnlButtons" runat="server" HorizontalAlign="Center">
<asp:Button ID="btnGroupSummary" runat="server" Text="Group Summary" CssClass="btn btn-mainmenu" OnClick="btnGroupSummary_Click" BackColor="#3D5C5C" /><br />
<br />
<asp:Button ID="btnServices" runat="server" Text="Services" CssClass="btn btn-mainmenu" BackColor="#527A7A" /><br />
<br />
<asp:Button ID="btnLetters" runat="server" Text="Letters" CssClass="btn btn-mainmenu" BackColor="#94B8B8" />
</asp:Panel>
</div>
The CSS for the "main-background" div is as follows:
.main-background {
background: url(../Images/main-background.JPG) center fixed;
background-size: 800px, 800px, auto;
}
Any assistance on resolving this issue would be greatly appreciated.