Tom
Tom

Reputation: 541

HTML width of table headers

i wish to (unsurprisingly) line up the table headers with the columns. Ive tried using:

<th><div style='width:30px;'>ID</div>

but it doesnt appear to like it

Strangely enough, i was able to use a div to set an initial offset like:

<th><div style='margin-left:30px;' /></th> 

so how can i give each table header an actual width?

Thanks

Upvotes: 0

Views: 1152

Answers (1)

Rocket Ronnie
Rocket Ronnie

Reputation: 1116

th{width:30px}

or give you th common classes. eg:

<tr>
<th class="header01"></th>
</tr>

then .header01{width:30px}

Probs gonna need to see your table if you want a better answer

Upvotes: 1

Related Questions