Forum How do I...?

get value of attribute

jim_albright
Until there is automatic tracking available for when the last line of a paragraph is short ( like just a couple of words). I would like to put the value of an attribute "tracking" into the
letter-spacing:content();

Right now I can just set the letter spacing to a fixed amount

*[tracking]{
letter-spacing:-0.10pt;
;

I guess I could create several attributes indicating how much tracking I wanted .... tracking10, track15, tracking17,


This does invalidate the html code as there is no attribute tracking.

That there is any way of doing this is better than the "good old days".

Jim Albright
Wycliffe Bible Translators

Jim Albright
Wycliffe Bible Translators

mikeday
This should work:
*[tracking] { letter-spacing: attr(tracking) }
jim_albright
works great. Thanks.

Jim Albright
Wycliffe Bible Translators