Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to increase the colum width

 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to increase the column width like below. But it doesn't seem to work. I want to increse the colum width for "Open" and "close" columns. Any increment in the width does not work.
Can some one let me know what is the right way of achieving this?

<tr>
<th width ="20" rowspan="2" >Contract </th>
<th width ="200" colspan="4">Floor <br> Price </th>
<th width ="40" colspan="2">Settle</th>
<th width ="160" colspan="8">Current-Volume </th>
<th width ="40" colspan="2">Contract</th>
</tr>

<tr>
<th width ="80"> Open</th>
<th width ="20"> High</th>
<th width ="20"> Low</th>
<th width ="80"> Close</th>
<th width ="20"> Price</th>
<th width ="20"> Change</th>
<th width ="20"> TotalVolume</th>
<th width ="20"> OI</th>
<th width ="20"> Change</th>
<th width ="20"> ADJ</th>
<th width ="20"> val1</th>
<th width ="20"> val2</th>
<th width ="20"> Spread</th>
<th width ="20"> Volume</th>
<th width ="20"> High</th>
<th width ="20"> Low</th>
</tr>
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really need to use units (px,em,%)

Eric
 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.
Do you have any good pointers (links) as to how to use it?

Originally posted by Eric Pascarello:
You really need to use units (px,em,%)

Eric


Thanks,
Trupti
 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried using thr percentage width increase like below.
But I do not see any difference in the output.

<table width="100%" border="0" cellpadding="2" cellspacing="1" id="priceTable">

<tr>
<th width ="10%" rowspan="2" >Contract </th>
<th width ="35%" colspan="4"><br> Price </th>
<th width ="15%" colspan="2">Settle</th>
<th width ="25%" colspan="8">Current-
<br> <c ut value="${report.Date}" />
</th>
<th width ="15%" colspan="2">Contract</th>
</tr>

<tr>
<th width ="10%"> Open</th>
<th width ="7%"> High</th>
<th width ="7%"> Low</th>
<th width ="10%"> Close</th>
<th width ="7%"> Price</th>
<th width ="7%"> Change</th>
<th width ="7%"> Total<br>Volume</th>
<th width ="7%"> OI</th>
<th width ="7%"> val1</th>
<th width ="7%"> val2</th>
<th width ="7%"> val3</th>
<th width ="7%"> val4</th>
<th width ="7%"> <br>Volume</th>
<th width ="7%"> lt;br>Volume</th>
<th width ="7%"> High</th>
<th width ="7%"> Low</th>
</tr>

Thanks,
Trupti

[ June 29, 2007: Message edited by: trupti nigam ]

[ June 29, 2007: Message edited by: trupti nigam ]

[ June 29, 2007: Message edited by: trupti nigam ]
[ June 29, 2007: Message edited by: trupti nigam ]
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Trupti,

I increased the Floor Price a bit... Do you like it?

Regards,
Dan


[ June 28, 2007: Message edited by: Bear Bibeault ]
 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dan Drillich:
[QB]Hi Trupti,

I increased the Floor Price a bit... Do you like it?

Regards,
Dan

That did not help.
Any other pointers?Basically I am trying to print 2 int values from two different database tables in on column in the HTML table but they should be printed apart with some space between them like below
12345 45678

but now since the column width is not enough , one value is printed on on line 1 and second on line2.

Thanks\
Trupti
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this -


[ June 29, 2007: Message edited by: Dan Drillich ]
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also consider adding an inline style such as -

 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the record.....

'HTML & XTML � The Definitive Guide' says on page #372:


The nowrap attribute -

Browsers treat each table cell as though it were a browser window unto itself, flowing contents inside the cell as they would (with) common body contents. (although subject to special table cell-alignment properties). Accordingly, the browsers automatically wrap text lines to fill the allotted table cell space. The nowrap attribute, when included in a table row, stops that normal word wrapping in all cells in that row.



For example, a nowrap attribute in the td tag -



Regards,
Dan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic