Note that there are some explanatory texts on larger screens.

plurals
  1. POInline CSS required to display image map in Firefox?
    primarykey
    data
    text
    <p>I've included an image map using CSS (as described in <a href="http://www.alistapart.com/articles/sprites" rel="nofollow">this rather old 2004 article</a> in <em>A List Apart</em>) in an externally-hosted <a href="http://www.facebook.com/donaldjenkins.net?sk=app_186821848024009" rel="nofollow">a Facebook iframe page</a>. I'm using an image map with images for a:link/a:hover, with the CSS included in an external stylesheet. The page displays correctly in Safari and Chrome, but <a href="http://cl.ly/4olz" rel="nofollow">not in Firefox 3.6</a> on Mac OS X.</p> <p>If I switch back to inline styles, the page <a href="http://cl.ly/4omS" rel="nofollow">displays properly</a> in Firefox.</p> <p>Here's the code with the styles applied inline:</p> <pre><code>&lt;style type="text/css"&gt; #home-page-nav { width: 512px; height: 139px; background: url(http://mysite.com/imagemap.jpg); margin: 10px auto; padding: 0; position: relative;} #home-page-nav li { margin: 0; padding: 0; list-style: none; position: absolute; top: 0;} #home-page-nav li, #home-page-nav a { height: 141px; display: block;} #blog-icon {left: 0; width: 127px;} #links-icon {left: 128px; width: 128px;} #twitter-icon {left: 256px; width: 128px;} #flickr-icon {left: 384px; width: 128px;} #blog-icon a:hover { background: transparent url(http://mysite.com/imagemap.jpg) 0 -139px no-repeat;} #links-icon a:hover { background: transparent url(http://mysite.com/imagemap.jpg) -128px -139px no-repeat;} #twitter-icon a:hover { background: transparent url(http://mysite.com/imagemap.jpg) -256px -139px no-repeat;} #flickr-icon a:hover { background: transparent url(http://mysite.com/imagemap.jpg) -384px -139px no-repeat;} &lt;/style&gt; &lt;ul id="home-page-nav"&gt; &lt;li id="blog-icon"&gt;&lt;a href="http://donaldjenkins.net/"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li id="links-icon"&gt;&lt;a href="http://links.donaldjenkins.net/"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li id="twitter-icon"&gt;&lt;a href="http://twitter.com/donaldjenkins"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li id="flickr-icon"&gt;&lt;a href="http://flickr.com/photos/astorg"&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Any suggestions as to solving this welcome.</p> <p><em>UPDATE: The solution was found thanks to Neil below</em>. Just in case anyone else has the same issue, here's how to fix it. The solution is to update the configuration of the web server hosting the CSS file. Some Apache and iPlanet web servers are associating files having a .CSS with an incorrect MIME-type such as "text/plain" or "application/x-pointplus". In some cases, Netscape 7.x and Mozilla ignore the CSS file because of its wrong MIME type and use a default style sheet that causes the layout to be different from what was intended by the web developer. See <a href="https://developer.mozilla.org/en/incorrect_mime_type_for_css_files" rel="nofollow">this page</a> on the Mozilla Development Network for more details.</p> <p>The simplest way to solve it is by including the following line in your .htaccess file:</p> <pre><code>AddType text/css .css </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