Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 28th, 2006, 12:11 PM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to RickoT Send a message via AIM to RickoT Send a message via MSN to RickoT Send a message via Yahoo to RickoT
Default Max column width in table

Is there a way to make a table only extend to a certian maximum width? I am displaying names that some times will force the width of the table and offset the rest of the data... I dont really care if the name of the person gets cut off so much as maintaining the structure of the table that is being shown

Thanks!

Bah!
 
Old November 29th, 2006, 04:31 AM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

What about giving every column a default width. Im afraid the colums will still grow if there is to much text in it. You will need to output a max lenght of characters with serverside programming.

__________________________________________________ ________
I am DJ Kat...that's my name. Its a D and a J and a Kat with a K.
 
Old November 29th, 2006, 08:16 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can use the table-layout style attribute for this...
Code:
<table style="table-layout: fixed;">
    <tr>
        <td style="width: 50px;">averylongwordthatstretchesthetable</td>
    </tr>
</table>
HTH,

Chris






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set Column width harapraveen XSLT 2 October 23rd, 2007 03:14 AM
Code Announcement: Emulating min/max width in IE richard.york BOOK: CSS Instant Results 0 November 27th, 2006 01:58 PM
Setting Column Width r_ganesh76 Excel VBA 2 February 2nd, 2005 06:06 AM
Column width immanuelsamuel Oracle 2 March 13th, 2004 10:30 AM
Fix table column width?? Snib HTML Code Clinic 2 January 4th, 2004 03:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.