Fixing TD width problem

Hi,

I have a problem with my table I can’t seem to figure out.


div#content table#ticketTable {
	width: 960px;
	margin-top: 10px;
	border: 1px solid #999;
	table-layout:fixed;
}

	table#ticketTable thead tr {
		background-color:#FF9900;
		color: #fff;
		font-weight: bold;
		border: 1px solid #999;
		
	}
	
		table#ticketTable thead tr td {
			padding: 5px;
		}
		
	table#ticketTable tbody tr {
		border: 1px solid #999;
		border-top: 0;
		padding: 5px;
	}
	
	table#ticketTable tbody tr.headRow {
		background-color:#ebebeb;
	}
	
		table#ticketTable tbody tr td {
			padding: 8px;
		}
		
		table#ticketTable tbody tr td#twentyfive {
			width: 240px;
		}

<table id="ticketTable">
				<thead>
					<tr>
						<td colspan="2">Ticket Details</td>
					</tr>
				</thead>
				<tbody>
					<tr>
					<td id="twentyfive">
						<span>Ticket ID:</span>
					</td>
					<td>
						'.$ticketInfo['ticketID'].'
					</td>
					</tr>


The problem I have is “twentyfive” is still defaulting to 50% of the table. It’s probably something small, but am I missing something here?

Cheers,
Rhys

Remove ‘table-layout:fixed;’ from your #ticketTable definitions.

Thanks. That worked. Is there a way to have both? I set the table to fixed because long URLs typed in by users were causing the table to span out of view.

I’m not sure.
Do you need to show the full URL? could you truncate it or display a link instead?

You could try applying a width to each cell across one row so that the table knows how wide each is supposed to be instead of just assuming that the one without a set width will take up the rest.