Good morning.
I'm trying to put a list inside a div with overflow set to auto, so if the list is larger than the div a scroll bar appears, but if list elements have text with spaces, the list seems to to a sort of word wrap with them. Can you tell me how to disable this kind of behaviour?
Note: this happens in IE6 and Firefox 0.92.
Here is the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<style>
ul.tree {
}
div.tree {
width: 150px;
height: 400px;
border: 1px solid Black;
overflow: auto;
}
</style>
<body>
<div class="tree">
<ul class="tree">
<li>Element 1</li>
<li>Element 2_______________</li>
<li>Element_3_______________</li>
</ul>
</div>
</body>
</html>
Thanks in advance,
Migrate.tree li {white-space:nowrap;}Thanks Fang for the quick anwser.
That resolved my problem.
Best Regards,
Migrate
I'm trying to put a list inside a div with overflow set to auto, so if the list is larger than the div a scroll bar appears, but if list elements have text with spaces, the list seems to to a sort of word wrap with them. Can you tell me how to disable this kind of behaviour?
Note: this happens in IE6 and Firefox 0.92.
Here is the code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<style>
ul.tree {
}
div.tree {
width: 150px;
height: 400px;
border: 1px solid Black;
overflow: auto;
}
</style>
<body>
<div class="tree">
<ul class="tree">
<li>Element 1</li>
<li>Element 2_______________</li>
<li>Element_3_______________</li>
</ul>
</div>
</body>
</html>
Thanks in advance,
Migrate.tree li {white-space:nowrap;}Thanks Fang for the quick anwser.
That resolved my problem.
Best Regards,
Migrate