View Full Version : - sign wraps the text .....

12-16-2006, 05:25 PM
Below is the HTML written for a sample table(one row) with some CSS, and I'm observing a strange brhavior atleast it is to me, here is that HTML

<table class=cDGrd id=tbleExposure
style="table-layout:fixed; WIDTH: 979px; overflow: scroll;" border=1>

<tr HEIGHT=25>
<td STYLE="WIDTH: 10px; white-space: nowrap;">030001</td>
<td STYLE="WIDTH: 100px; white-space: nowrap;">2444</td>
<td STYLE="WIDTH: 100px; white-space: nowrap;">-1111111144,783,156.94</td>
<td STYLE="WIDTH: 100px; white-space: nowrap;">77,777,975.10</td>
<td STYLE="WIDTH: 150px; white-space: nowrap;">1122,561,132.04</td>
<td STYLE="WIDTH: 100px; white-space: nowrap;">133,276,503.70</td>
<td STYLE="WIDTH: 100px; white-space: nowrap;">53,403,919.06</td>
<td STYLE="WIDTH: 149px; white-space: nowrap;">186,680,422.76</td>
<td STYLE="WIDTH: 100px; white-space: nowrap;">Sell</td>
<td STYLE="WIDTH: 100px; white-space: nowrap;">0</td>
<td STYLE="WIDTH: 100px; white-space: nowrap;">Sell Status</td>


this works fine but the strange thing is that for example if I add a '-' sign before this value '1111111144,783,156.94' then contents r wrapped into '-' and '1111111144,783,156.94' :confused: and as I've fixed the td hieght to '25px' so I could only see the '-' sign, adding anything other than '-' like + or * or any aphabet or number works as intended.

so can any 1 help me out that what is missing in it?

12-16-2006, 05:42 PM
This only happens in IE. IE must decide that that is a good place to wrap the text (Between the sign and the #)

Anyhow, what's the point of putting data in a table that isn't big enough to hold it?


12-16-2006, 09:24 PM
yes Whizard thats right there is no point in it but the real issue is that why IE is treating only '-' sign differently, it works absolutely fine with *,+,#,$ with fine I mean it doesn't wraps it.

12-16-2006, 09:54 PM
Itís probably just another one of Internet Explorerís infinite bugs. Using white-space: pre seems to take care of the problem.

That document could also use less inline CSS:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Author" content="Patrick Garies"/>
<title>XHTML 1 Strict Document</title>

<style type="text/css">
table {
width: 979px;
border: 1px outset;
table-layout: fixed;
td {
height: 25px;
border: 1px inset;
white-space: pre;
col {
width: 10px;
col[span] {
width: 100px;
col[span="3"] + col {
width: 150px;
col[span="2"] + col {
width: 149px;


<table id="tbleExposure" class="cDGrd">
<col span="3"/>
<col span="2"/>
<col span="3"/>
<td>Sell Status</td>


12-16-2006, 09:59 PM
It probably thinks '-' is a hyphen, so it wraps the text there


12-16-2006, 10:07 PM
Well, now that I think about it, the issue could be avoided altogether if you used the a more specific character (a minus sign) for the negative sign instead of the the hyphen‐minus character. Internet Explorer doesnít seem to wrap the text when the minus sign (−) is used; you can type it directly or encode it as &minus; or &#x2212;.

12-17-2006, 06:04 PM

IE sucks

12-18-2006, 08:41 AM
by the way is their any css thing that prevent IE from wrapping the text altogether irrespective of the contents like '-'

12-18-2006, 10:44 PM
I mentioned how to do that in post four (http://www.codingforums.com/showpost.php?p=515349&postcount=4)Ö

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum