Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK Beginning CSS: Cascading Style Sheets for Web Design, 2nd Ed; ISBN: 978-0-470-09697-0
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design, 2nd Edition by Richard York; ISBN: 9780470096970
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK Beginning CSS: Cascading Style Sheets for Web Design, 2nd Ed; ISBN: 978-0-470-09697-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 27th, 2008, 06:48 PM
Registered User
 
Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 1. Example 1-1

I typed the example and when I validate the site I get the following message:

The tag: "img" doesn't have an attribute: "onload" in currently active versions.[XHTML 1.0 strict]

I can't find the problem...
could anyone help?

<!DOCTYPE html PUBLIC "- / /W3C/ / DTD XHTML 1.0 Strict/ /EN"
"http://www.w3.org/TR/xhtml1/-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Gas Giants</title>
<link rel='stylesheet' type='text/css' href='solar_system.css'/>
<script type='text/javascript'>
var fixpng = function($img) {};
</script>
<!--[if lt IE 7]>
<link rel='stylesheet' type='text/css' href='solar_system.ie.css' />
<script type='text/javascript'>
// This fixes PNG transparancy in IE
var fixpng = function ($img)
{
var $html =
'<span ' +
(($img.id)? "id='" + $img.id + "' " : '') +
(($img.className)? "class='" + $img.className + "' " : '') +
(($img.title)? " title'" + $img.title + "' " : '') +
'style="' +
'display: inline-block:' +
'width: ' +$img.width + 'px;' +
'height: ' + $img.height + 'px;' +
"filter:progid:DXImageTransform.Microsoft.AlphaIma geLoader(" +
"src='" + $img.src + "', sizingMethod='scale'): "+
$img.style.cssText + ' " ';

if ($img.getAttribute('mouseoversrc'))
{
$html += "mouseoversrc='" + $img.getAttribute(mouseoversrc') + "' ";
}

if ($img.getAttribute('mouseoutsrc'))
{
$html +=mouseoutsrc='" + $img.getAttribute('mouseoutsrc') + "' ";
}
$html += '></span>';
$img.outerHTML = $html;
}
</script>
<![endif]-->
</head>

<body>
<!--
Image reuse guidelines
http://www.nasa.gov/multimedia/guidelines/index.html
-->
<div id='solar-system'>
<div class='planet jupiter'>
<img src='images/jupiter.png'
alt='Jupiter'
class='planet'
onload='fixpng(this) ;' />
<div class='planet-copy'>
<h1>Jupiter</h1>
<ul>
<li><b>distance from the Sun:</b> 78,412,020 km</li>
<li><b>Equatorial Radius:</b> 71,492 km</li>
<li><b>Volume:</b> 1,425,500,000,000,000 km<sup>3</sup></li>
<li><b>Mass:</b> 1,898,700,000,000,000,000,000,000,000 kg</li>
<li>
<a href='http:solarsystem.jpl.nasa.gov/planets/profile.cfm?object=Jupiter'>
More Facts
</a>
</li>
</ul>
<img src='images/symbols/jupiter.png'
alt='Mythological Symbol for Jupiter'
onload='fixpng(this);' />
</div>
</div>
<div class='planet saturn'>
<img src='images/saturn.png'
alt='Saturn'
class='planet'
onload='fixpng(this);'/>
<div class='planet-copy'>
<h1>Saturn</h1>
<ul>
<li><b>Distance from the Sun:</b> 1,426,725,400 km</li>
<li><b>Equatorial Radius</b> 60,268 km</li>
<li><b>Volume:</b> 827,130,000,000,000 km<sup>3</sup></li>
<li><b>Mass:</b> 568,510,000,000,000,000,000,000,000 km</li>
<li>
<a href='http:solarsystem.jpl.nasa.gov/planets/profile.cfm?object=Saturn'>
More Facts
</a>
</li>
</ul>
<img src='images/symbols/saturn.png'
alt='Mythological Symbol for Saturn'
onload='fixpng(this);' />
</div>
</div>
<div class='planet uranus'>
<img src='images/uranus.png'
alt='Uranus'
class='planet'
onload='fixpng(this):' />
<div class='planet-copy'>
<h1>Uranus</h1>
<ul>
<li><b>Distance from the Sun:</b> 1,426,725,400 km</li>
<li><b>Equatorial Radius</b> 60,268 km</li>
<li><b>Volume:</b> 827,130,000,000,000 km<sup>3</sup></li>
<li><b>Mass:</b> 568,510,000,000,000,000,000,000,000 km</li>
<li>
<a href='http://solarsystem.jpl.nasa.gov/planets/profile.cfm?object=Uranus'>
More Facts
</a>
</li>
</ul>
<img src='images.dymbols/uranus.png'
alt='Mythological Symbol for Uranus'
onload='fixpng(this);'/>
</div>
</div>
<div class='planet neptune'>
<img src='images/neptune.png'
alt='Neptune'
class='planet'
onload='fixpng(this);'/>
<div class='planet-copy'>
<h1>Neptune</h1>
<ul>
<li><b>Distance from the Sun:</b> 1,426,725,400 km</li>
<li><b>Equatorial Radius</b> 60,268 km</li>
<li><b>Volume:</b> 827,130,000,000,000 km<sup>3</sup></li>
<li><b>Mass:</b> 568,510,000,000,000,000,000,000,000 km</li>
<li>
<a href='http://solarsystem.jpl.nasa.gov/planets/profile.cmf?object=nepture'>
More Facts
</a>
</li>
</ul>
<img src='images/symbols/neptune.png'
alt='Mythological Symbol for Neptune'
onload='fixpng(this);'/>
</div>
</div>
</div>
</body>
</html>
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
chapter 7 - chapter 11 pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 January 6th, 2008 11:40 AM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM



All times are GMT -4. The time now is 07:03 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.