Question

When I try the following code in IE8 compatibility mode, the scroll bar hides the content.

<style>
.myclass {
    overflow: auto;
    width: 400px;
}
</style>
<div class="myclass">
ReallyLongTextHere123456789012345678901234567890123456789012345678901234567890
</div>

This only happens when there is a long string with no spaces. Other browsers and newer versions of IE8 display this correctly.

Is there a way to fix this issue without affecting the way it looks on other browsers?

Was it helpful?

Solution

.myclass {
    overflow: auto;
    width: 400px;
word-wrap:break-word;
}

Modify your css like this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top