css - Styling native tooltip from title="Tooltip text" -
i have input element has title attribute of course result tooltip message of attribute value.
for reason tooltip needs styled css.
how can done? not know in container rendered, not know nothing it. cannot accessed developer tools of firebug
it seems there in fact pure css solution, requiring css attr
expression, generated content , attribute selectors (which suggests works far ie8):
a[title]:hover:after { content: attr(title); position: absolute; }
source: http://jsfiddle.net/tdqwn/
update w/ input @viroscar: please note it's not necessary use specific attribute, although i've used "title" attribute in example above; recommendation use "alt" attribute, there chance content accessible users unable benefit css.
update again i'm not changing code because "title" attribute has come mean "tooltip" attribute, , it's not idea hide important text inside field accessible on hover, if you're interested in making text accessible "aria-label" attribute seems best place it: https://developer.mozilla.org/en-us/docs/web/accessibility/aria/aria_techniques/using_the_aria-label_attribute
wiki
Comments
Post a Comment