kp_
kp_

Reputation: 123

HTML Table th Width Not Displaying Properly

I am having an issue with one of my Table's setup in my HTML. I have three header titles and for some reason they are not occupying the complete 100% width. However, the body does occupy the 100% width. I'm not quite sure what is going on. I have another table that works just fine. I have attached an image and the html code of the table. The display will still be the same as it is in the image below even if I remove the specified width percentages. Any help would be much appreciated! Thanks in advance!

<table id="timePreferenceTable" class="table-striped" cellpadding="0" cellspacing="0" border="0">
  <thead>
    <tr>
      <th width="34%">Start Time</th>
      <th width="34%">End Time</th>
      <th width="32%">Days</th>
    </tr>
  </thead>
  <tbody></tbody>
</table>

HTML-TABLE-TH-BUG

Upvotes: 0

Views: 1270

Answers (1)

Sachin
Sachin

Reputation: 40970

Try to set width="100%" on your table. I am not sure what your class does. if it is not setting the width 100% then do it.

<table width="100%" id="timePreferenceTable" class="table-striped" cellpadding="0" cellspacing="0" border="0">

Upvotes: 3

Related Questions