In Dan Cederholm's book "Web Standards" on page 212 a
Logo Swap trick is presented that works great in IE
6.0.28, but fails to show image in Firefox 1.0.3. A
code snibblet is at end of email.

Has anyone got this working in Firefox? Maybe there
are some general updates to this Logo Swap design
technique?

I did slightly modify code from book by referencing
div#logo not #logo and by adding "border-style: none;"
, "float: left;" and "margin-top: 25px;"

Below is code snibblet. The general idea of this
technique is to show a different logo when CSS is NOT
available, and I also hope to it to print a different
logo.

<!DOCTYPE html PUBLIC
 "-//W3C//DTD XHTML 1.0 Strict//EN" 
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<?xml version="1.0" encoding="EUC-JP"?>
<html xmlns="http://www.w3.org/1999/xhtml";
xml:lang="en-us" lang="en-us">
<head>
<title>Firefox Logo Swap</title>
<meta http-equiv="Content-type" content="text/html;
charset=EUC-JP" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Content-Language" content="en-us" />
<style type="text/css">
div#logo
{
  float: left;
}
div#logo img
{
  border-style: none;
  display: block;
  width: 0;
}
div#logo span
{
  width: 300px;
  height: 36px;
  margin-top: 25px;
  background: url(./ff-logo-hifi.gif) no-repeat;
}
div#logo a
{
  border-style: none;
  display: block;
  margin-top: 25px;
  width: 300px;
}
</style>
</head>
<body>
<div id="logo">
  <span><a href="./ff-img-swp.html"><img
src="./ff-logo-lofi.gif" width="300" height="36"
alt="Logo" /></a></span>
</div>
</body>
</html>

Brad Sturtevant
Principle Technologist
Sturdyworks
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to