All Posts by Email, Once a Week

Media Temple logo

CSS-Tricks is brought to you in part by Media Temple, the web hosting that we both use and recommend.

CSS and XML image

  • # January 12, 2009 at 10:40 am

    I am new to CSS and I can’t seem to get an image displayed. The xml is properly linked to the .css file, and the css entry is being processed ( I get the correct size and border background.) I do not have a web page to direct you to, I have both files locally in the same directory and bring it up in either IE or FF by double clicking on the .xml file.
    Please help.
    Thanks in advance – Jim


    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/css" href="jbook2.css"?>
    <imgloc src="; alt="Test Image" />
    <title>Digital Typography</title>
    <author>Donald Knuth</author>


    imgloc {
    display: block;
    border: dotted;
    width: 100px;
    height: 100px;

    book {
    display: block;
    margin: 0.5em;
    font-family: Arial, Helvetica, sans-serif;

    title {
    display: block;
    margin: 0.5em;
    font-size: 1.5em;
    color: red;

    author {
    display: block;
    margin: 0.5em;
    font-size: 1.5em;

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed