This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How to increase the colum width Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to increase the colum width" Watch "How to increase the colum width" New topic
Author

How to increase the colum width

trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
You really need to use units (px,em,%)

Eric
trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
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

Joined: Jun 21, 2001
Posts: 613
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

Joined: Jul 09, 2001
Posts: 1176
Hi Trupti,

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

Regards,
Dan


[ June 28, 2007: Message edited by: Bear Bibeault ]

William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
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

Joined: Jul 09, 2001
Posts: 1176
Try this -


[ June 29, 2007: Message edited by: Dan Drillich ]
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1176
You can also consider adding an inline style such as -

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1176
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to increase the colum width