Search code examples
asp.net-mvchtmlsafarisafari-web-inspector

img will not render in Safari


I am working on a legacy application which works in ie but not in Safari. The image in the code will not render in Safari.

     <section class="feature pointer clickableSection tooltipContainer" id="SearchSection" 
                    data-scd-nextScreen="@Url.Action("FullSearch", "Company")"data-placement="bottom"
                    data-toggle="tooltip" data-title="Click here to SEARCH Addresses">
            <img src="@Url.Content("~/images/phonebook.png")" alt="Click here to SEARCH Addresses" />
            <h3><span style="text-decoration: underline">Search Addresses</span><span id="searchHeading"></span></h3>
            <div class="loadMessage"></div>       
        </section>

I have got the Safari Web Inspector up and running, but I cannot see where I can find out where the problem is. I am new to using this tool.


Solution

  • I found where the problem is. In my CSS which I did not publish, it has;

    section.feature img {
        color: #999;
        /*content: attr(alt);*/
        font-size: 1.5em;
        font-weight: 600;
        height: 140px;
        width: 200px;
    }
    

    I have commented out the line that is not compatable with Safari, ie content: attr(alt);