[thelist] css behaviors

.jeff jeff at members.evolt.org
Sat Feb 2 00:44:00 CST 2002


matt,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Warden, Matt
>
> 1. i have to nest an anchor within a cite tag
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

yup.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> 2. i have to class/style that anchor so that i don't
>    lose the styling i have with the cite element
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

nope, when styling your <cite> tag, include the nested <a> tag in your
declaration:

cite, cite a {
  color: #000000;
  background: #ffffff;
  font-style: italic;
}

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> seriously, im not liking the idea of linked footnotes,
> even though i can't really verbalize why.
>
> what's wrong with using a behavior that changes the
> location to page+"#footnotes" ? that way, i can
> cleanly go on making footnotes with the cite element
> and i wont have something ugly like:
>
> <cite><a href="#footnotes"
>          title="See Footnotes">(2)</a></cite>
>
> rather than:
>
> <cite>(2)</cite>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

what browsers are you targeting with this?  if it's ie5+/win only, then try
a css behavior.  one for this sort of trickery should be hella easy.  holler
if you wanna go this route.  i've written a fair number of behaviors and
could probably whip this sort of thing up rather quickly.  it'd then be as
simple as attaching the behavior to the css entry for the <cite> tag.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> ah. so:
>
> <cite><a name="foot2" href="#footnotes" title="See
> Footnotes">(2)</a></cite>
>
> which brings up a question, can i use the href and name
> attributes in the same anchor element? gets even worse
> if i can't...
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

yes, of course you can.  just make sure that the "name" attribute value
doesn't match the bookmark being linked to in the "href" attribute or
clicking the link will do nothing.  ;)

good luck,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/





More information about the thelist mailing list