Forum Moderators: not2easy

Message Too Old, No Replies

Help Finding CSS3 Docs

I cant find anything on w3c

         

TellJane

8:40 am on Oct 17, 2004 (gmt 0)

10+ Year Member



hello

im trying to find out how to take an attribute from an element and use it. kind of like this

<a href="link.html" title="title">a link</a>

I want to select the title and use it with :before

I think this is possible in css3 but cannot find the details at w3c, can anyone help me find what i need please?

thankyou very much

ronin

1:10 pm on Oct 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try this:

[w3.org...]

ronin

3:07 pm on Oct 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Oh I see.
That's not quite what you want, is it?

If you combine CSS with Javascript you can probably achieve your desired result.

Robin_reala

3:11 pm on Oct 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



XSLT is probably the natural next step up for this...

TellJane

3:55 pm on Oct 17, 2004 (gmt 0)

10+ Year Member



thats probably a little too much work for such a small thing but thankyou

i was hoping to do somthing like this

<a href="link.html" title="the title">link</a>

a[title] { :before: <value of the title attribute>; }

but that doesnt seem possible to do easily, nevermind

thankyou again ronin & robin

ronin

6:56 pm on Oct 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm sure it would be possible with javascript.

My knowledge of js isn't up to much, but I'm positive you could use getElementById to turn a.title into a variable and then insert the variable into an a:before style using document.write or something...