Title attribute

F

Fabri

I guess if it is possible to write a multiline title attribute natively
with HTML + CSS.

GMail does it and I don't know how.

<div title="first line[\n doesn't work]second line">My Div</div>

Any help appreciated.

Regards.
 
A

Arne

Once said:
I guess if it is possible to write a multiline title attribute natively
with HTML + CSS.

GMail does it and I don't know how.

<div title="first line[\n doesn't work]second line">My Div</div>

Any help appreciated.

Regards.

I belive you must use Javascript for that.

--
/Arne

Top posters will be ignored. Quote the part you
are replying to, no more and no less! And don't
quote signatures, thank you.
 
J

Jukka K. Korpela

Fabri said:
I guess if it is possible to write a multiline title attribute
natively with HTML + CSS.

Of course. In HTML, a line break is permitted inside an attribute
value. CSS has nothing to do with this.

What you probably mean, though, is whether you can make browsers
_display_ an attribute value in two (or more) lines with a line break
in a particular position. The answer is that by the specifications you
cannot, though some browsers incorrectly treat a line break as in
title="first line
second line"
as requesting a line break in output, not as equivalent to a space, as
the specifications say.
Any help appreciated.

When in a dead end, backtrack. What was the reason for your wish to
display a title attribute in two lines? It probably indicates a wrong
idea of the attribute. It is an "advisory title" - basically, something
that the user might or might not hear or see and that might sometimes
help her, but it should not contain anything that users _must_ know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top