Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.Net button won't render background-image
    primarykey
    data
    text
    <p>I've checked most of the linked questions here on this topic and also in asp.net forums and I am stuck. I have the following in one of my .aspx pages:</p> <pre><code>&lt;asp:button ID="btnAdmin" runat="server" Width="70px" Height="30px" Text="Admin" ToolTip="Facilities for administrators" CssClass="buttonStyleAdmin"&gt; &lt;/asp:button&gt; </code></pre> <p>I have the following in my .css file:</p> <pre><code>.buttonStyleAdmin { background-color: transparent; background-image: url('imgBlue-button-base.png'); font-size: 1.0em; cursor: pointer; } </code></pre> <p>I understand the url syntax should be relative to the location of the CSS file. After some trials with the url pointing to the images directory of the web, I gave up and copied the above .png file to the root of the web; that is, it is adjacent to the .css file itself. </p> <p>I have used both Google developer tools and Firebug in Firefox and the matched CSS rules seem to be correct. That is, I can hover over the section of the tool and the URL resolves such that the image itself is displayed. <img src="https://i.stack.imgur.com/aApSd.png" alt="GoogleChromeDeveloperTool-view"> </p> <p>Here is the Firebug view of the rendered page: <img src="https://i.stack.imgur.com/fQKsx.png" alt="enter image description here"></p> <p>If I can get this to resolve with both the .png file and the .css file in the root of the website, then I'd like to change the reference to the images folder where all the other images are gathered but with this failing with both files in the root of the web, I clearly need some advice on what could be wrong. I am using Visual Studio 2008 on a webserver running .Net Framework 3.5 (Windows Server 2003). </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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.
    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