HTML:lists

Peter Murray pem at po.cwru.edu
Fri Mar 6 09:08:22 EST 1998


--On Mon, Mar 2, 1998 11:40 AM -0800 "Thomas Dowling"
<tdowling at ohiolink.edu> wrote: 

>>It's possible with Style Sheets, using the "list-style-image" property.
>>Unfortunately, this property has limited current support.  (Doesn't work
in
>>Netscape yet; it's supposed to work in IE4).
> 
> I suspect Bob and I both relied on the Web Review master grid for this
> (http://style.webreview.com/mastergrid.html), and I think we were both led
> astray.  IE4 is listed as supporting it, but my copy doesn't do so.

As it happens, the guy who wrote and maintains the CSS Master Grid is in the
office next to me.  I asked him about this, and we cannot come up with a
test case in MSIE4 where it isn't supported.  A stripped down version of a
test looks like:

  <HTML>
  <HEAD>
  <TITLE>Testing list-style-image property</TITLE>
  <STYLE type="text/css">
    .testing { list-style-image: url(http://www.cwru.edu/pix/blball.gif); }
  </STYLE>
  </HEAD>
  <BODY>
  <H1>Testing list-style-image property</H1>
  <UL CLASS="testing">
    <LI>This is a test.
    <LI>Each line should have a blue bal
  </UL>
  </BODY>
  </HTML>

If you know of a test case were it doesn't work, please let me know so that
Eric can correct the table.

>>To try it, pop the following into an HTML doc header:
>><STYLE><!-- UL { list-style-image: url(http://somewhere.edu/image.gif) }
>>--></STYLE>
>>(Not sure if URL to image *has* to be absolute or not?)
> 
> It should be interpreted relative to the document's URL, but some browsers
> wig out on this; better to expend a few keystrokes on an absolute URL.

Actually, it is relative to the Style Sheet source.  From Section 6.4 of the
specification:

  Partial URLs are interpreted relative to the source of the style
  sheet, not relative to the document.

If the style sheet is in-line, or the linked style sheet is in the same
directory as your HTML page, there is no difference, but if the linked style
sheet is somewhere else, be sure your 'url()' attributes are relative to the
style sheet's location.


Peter
--
Peter Murray, Library Systems Manager                    pem at po.cwru.edu
Digital Media Services                 http://www.cwru.edu/home/pem.html
Case Western Reserve University, Cleveland, Ohio          W:216-368-5888




More information about the Web4lib mailing list