not able to do max width
Well the reason why you not getting the expected result on the page you provided by the link is that you are using a span
instead of a div
.
Add
display: block;
to you style.
So, in your CSS, you can set the word-wrap
property to break-word
so that your string of text (w/ no whitespace) will be made to fit into the max-width:
E.g.
<style type="text/css">
#content {
max-width: 50px;
word-wrap: break-word;
}
</style>