Note that there are some explanatory texts on larger screens.

plurals
  1. POMaster page image not displaying in content page?
    primarykey
    data
    text
    <p>I have a master page with one <code>div</code> Header.</p> <pre><code>#header { background-image: url("images/ST_ERP_2.jpg"); background-repeat: no-repeat; background-position: right top; height: 200px; width: 1200px; } </code></pre> <p>below is the header <code>div</code></p> <pre><code>&lt;div id="header" &gt; &lt;h1&gt; Header goes here&lt;/h1&gt; &lt;/div&gt; </code></pre> <p>Both the above code snippents are in my master page.</p> <p>Now I have a content page (<code>xyz.aspx</code>) which is inside some directory.</p> <p>The image (ST_ERP_2.jpg) is in the <code>images</code> folder.</p> <p>Now when I try to view the page (<code>xyz.aspx</code>) in a browser it doesn't show me the image which I have set for <code>background-image</code> instead it shows me a blank white area. What could be the problem?</p> <p><strong>NOTE:</strong></p> <ol> <li><p>I have also tried <code>background-image: url("~/images/ST_ERP_2.jpg");</code> but it doesn't help me.</p></li> <li><p>I am using VS2010 and ASP.NET </p></li> </ol> <p><strong>MASTER PAGE:</strong></p> <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="Site" %&gt; &lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %&gt; &lt;%--&lt;%@ Register Assembly="AccordionSiteMap" Namespace="FranchiseBlast.UserControls.Interface" TagPrefix="lb" %&gt;--%&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head id="Head1" runat="server"&gt; &lt;style type="text/css"&gt; #wrapper { background: #FFFFFF; margin: 0px auto; width: 1200px; height: 1024px; } #header { background-image: url("images/ST_ERP_2.jpg"); background-repeat: no-repeat; background-position: right top; height: 200px; width: 1200px; } #footer { background: #838283; height: 40px; width: 1200px; margin: 600px 0px; } &lt;/style&gt; &lt;title&gt;&lt;/title&gt; &lt;/head&gt; &lt;body style="background: LightBlue"&gt; &lt;form id="form1" runat="server"&gt; &lt;div id="wrapper"&gt; &lt;div id="header" &gt; &lt;h1&gt; Header goes here&lt;/h1&gt; &lt;br /&gt; &lt;/div&gt; &lt;!--Header--&gt; .... content place holder and etc ...... &lt;div id="footer" style="clear: both"&gt; &lt;h3&gt; Footer goes here&lt;/h3&gt; &lt;/div&gt; &lt;!--Footer--&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload