spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / xml / column4

The Browser War continued: XML support in IE and Mozilla

Vice President of Risk Technology - READY TO HIRE! (NYC)
Next Step Systems
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume
Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs


The CSS2 solution for Mozilla

This whole book example was inspired by the Mozilla Amazon Search Example, so if you have a copy of Mozilla handy the link before brings you to a more flashy version of this example. IE5 users will only see a blank page because some of the CSS elements are not understood by this browser or can only be applied to HTML and not XML elements, or both. If you view the source you can at least see the raw XML. Not much of a help, though.

The CSS solution for Both Browsers

Simplifying the Mozilla examples yields some results in both browsers, by sticking to simple CSS1 elements:
Books {
  display: block;
}
Book {
  display: list-item;
  float: none;
  border: none;
  background: inherit;
}
Title {
  display: block;
  font-weight: bold;
  color: blue;
  text-decoration: underline;
  cursor: pointer;
}
Author {
  display: block;
  font-style: italic;
}
Synopsis {
  display: none;
}
ListPrice {
  display: none;
  text-align: right;
  padding-right: 15px;
  text-decoration: line-through;  
}
Price {
  display: block;
  color: rgb(20,100,0);
  font-weight: bold;
  text-align:left; 
}
ISBN {
  display: block;
  font-family: monospace;
  font-size: 8pt;
}
In this style sheet most elements are rendered as block items, the exceptions being Book which is a list item, and ListPrice and Synopsis which will be hidden from the viewer. Simple font attributes are applied to different book elements. See the output. Note that the links are not active in IE because it does not support X-Link. To make this work you would have to replace these links with HTML anchor elements already in the source.

next page

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


Produced by Michael Claßen
All Rights Reserved. Legal Notices.

URL: http://www.webreference.com/xml/column4/4.html
Created: Jan. 17, 2000
Revised: Jan. 17, 2000