trejder
trejder

Reputation: 17495

Can I use Bootstrap Tooltips inside table cell?

I'm trying to use Twitter Bootstrap Tooltips in table cell. Either this way:

<td><span rel="tooltip" title="Tooltip" data-delay="500">A<sub>p</sub></span></td>

or without a span:

<td rel="tooltip" title="Tooltip" data-delay="500">A<sub>p</sub></td>

Works just fine in both versions, but in each situation Netbeans warns me: "Attribute rel not allowed on element span/td at this point.".

What am I missing or doing wrong? Is it allowed to have tooltips in table cells?

Upvotes: 0

Views: 3045

Answers (2)

Thangaraja
Thangaraja

Reputation: 956

The rel attribute is to identify the relationship between current document and the target link. So rel can be used in:

  • tags link anchor,
  • link tag which has stylesheet URL,

In your case, you have used for tooltip which is not a standard defined by W3C. Hence, NetBeans objects and throws a warning.

Upvotes: 1

Darshan Joshi
Darshan Joshi

Reputation: 362

I don't use Netbeans. From what it is saying, as per HTML specification, you can not have tooltip on span and td tags.

However, if the target browsers support your attributes on span/td tags, you can use it. Moreover, you can prefix them using data- e.g. data-rel.

Upvotes: 1

Related Questions