Forum Moderators: open
If I want to show div's title in two lines by setting title in the div tag, how can I do it?
Thanks!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head><body>
<div id="dd"style="width:300px;height:300px;border:1px #00f solid;"title="jiuououu\nuiojij"></div>
<button onclick="document.getElementById('dd').title='first line\nsecond line';">click</button>
</body>
</html>
<div id="dd" style="width:300px;height:300px;border:1px #00f solid;" title="jiuououu <!--Manual Line Break in Code
uiojij"></div>
This can produce the desired effect, but you may see some browser complaining, and I have a feeling that an HTML validator may throw an error on this.
Previously discussed here: [webmasterworld.com...]