• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

what is "data-author" ?

DroidHost

Well-known member
#1
what is "data-author" ? in the template

<li id="post-84" class="message staff" data-author="Ali">

is it possible to use it inside css ? and how ?
 

bambua

Well-known member
#2
It's a custom attribute:

http://www.javascriptkit.com/dhtmltutors/customattributes.shtml

It really depends on what's reading it as to what you can do with it.

Here's some info on using CSS with it:

http://www.frequency-decoder.com/20...g-generated-content-and-html5-data-attributes

It's generally not recommended, the best use I've seen for it is for filtering on the website if you don't want to see someones post in XenForo ;)
what is "data-author" ? in the template

<li id="post-84" class="message staff" data-author="Ali">

is it possible to use it inside css ? and how ?