Mihnea Mihai
Mihnea Mihai

Reputation: 181

h:graphicImage title - formatted text

Can I use html attributes inside the title of a < h:graphicImage > ?

I'd like something like:

<h:graphicImage value="/images/box.gif" title="#{literal}"/>

where #{literal} is a String: < b > BoldText < /b >

Can the title attribute interpret the < b> tag?

Upvotes: 1

Views: 703

Answers (1)

Wanna Coffee
Wanna Coffee

Reputation: 2798

Since you are tagged with html, i answer you in HTML + CSS. you can do by setting some styles for attribute using CSS.

Html code:

<a href="#" title="This is link">Hi., Buddy.!!</a>

CSS code:

a {
  color: #900;
  text-decoration: none;
}

a:hover {
  color: red;
  position: relative;
}

a[title]:hover:after {
  content: attr(title);
  padding: 4px 8px;
  color: #333;
  position: absolute;
  left: 0;
  top: 100%;
  white-space: nowrap;
  font-weight: bold;
  border-radius: 5px;
  box-shadow: 0px 0px 4px #222;
  background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
  background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #eeeeee),color-stop(1, #cccccc));
  background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
  background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
  background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
  background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
}

Demo in JSFIDDLE: http://jsfiddle.net/f29uq/

Hope this helps..!!

Upvotes: 1

Related Questions