Forum Moderators: open
Got a very simple table listing file extensions, simple example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Won't wrap in IE</title>
</head>
<body>
<table>
<tr>
<td>
File types one:
</td>
<td>
.doc .docm .docx .dot .dotm .dotx .mdb .potx .ppam .pps .ppsm .ppsx .ppt .pptm .pptx .prj .pub .wps .xlam .xls .xlsb .xlsm .xlsx .xltx
</td>
</tr>
</table>
</body>
</html>
Works just fine in Firefox 3 and Chrome, but in IE6 & IE8 it does not wrap if you make the browser window smaller.
Tried a few things with the style:
style="white-space: normal" or style="white-space: pre" makes no difference at all.
Any ideas?
Cheers
Mike
<td>
.doc, .docm, .docx, .dot, .dotm, .dotx, .mdb, .potx, .ppam, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .prj, .pub, .wps, .xlam, .xls, .xlsb, .xlsm, .xlsx, .xltx
</td> I don't understand it either... Only thing I could find that seemed relevant was unicode line-breaking rules in IE [cs.tut.fi]
Try <table width="100%"> as a test, that should force the browser to allow wrapping, i think? An alternative is to put the table in a <div> to see if the browsers shrink the div and therefore the table.
<html>
<head>
<title>Won't wrap in IE</title>
</head>
<body>
.doc .docm .docx .dot .dotm .dotx .mdb .potx .ppam .pps .ppsm .ppsx .ppt .pptm .pptx .prj .pub .wps .xlam .xls .xlsb .xlsm .xlsx .xltx
</body>
</html> But adding another character in between words makes the line wrap, eg:
<html>
<head>
<title>Will wrap in IE</title>
</head>
<body>
.doc, .docm, .docx, .dot, .dotm, .dotx, .mdb, .potx, .ppam, .pps, .ppsm, .ppsx, .ppt, .pptm, .pptx, .prj, .pub, .wps, .xlam, .xls, .xlsb, .xlsm, .xlsx, .xltx
</body>
</html> Another alternative would be to code the list of file extensions as an unordered list and use CSS to display:inline.
Didn't say I tried setting the width of the table, even in pixels <table width="200px"> but it just doesn't wrap at all in IE, no matter what I tried the table width just grows.
Think I'll stick commas in, works then!
Thanks for your replies.
Mike