Cut Header Width Size

Cut Header Width Size

Nmastoris33Nmastoris33 Posts: 3Questions: 0Answers: 0
edited August 2013 in General
I am currently using a half-width table for site, but the only problem is that the header/footer is not scaling with the columns themselves. this is leaving a large amount of whitespace. This is my code: (I know it's simple, I'm new to this.)

[code]
$(document).ready(function () {
$("#jobSummaryTable").dataTable({
"iDisplayLength": 25,
"bDestroy": true,
"bJQueryUI": true,
"bAutoWidth": true,
"bFilter": false
});
[/code]

[code]



Count
Percentage
Status



@foreach (var item in Model.JobDetailItems)
{

@item.ItemCount
@item.Percentage%
@if (string.IsNullOrEmpty(item.TargetController))
{
@item.ProcessStateDescription
}
else
{
@Html.ActionLink(item.ProcessStateDescription, "Index", item.TargetController, new { id = item.ProcessStateId, JobId = Model.JobId }, new { })
}

}


[/code]

I'm hoping there is a simple piece of code that can solve this, thanks for the help in advance.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    We'd need a link to the page to say what is going on.

    Allan
  • Nmastoris33Nmastoris33 Posts: 3Questions: 0Answers: 0
    http://img.photobucket.com/albums/v506/Himaro/datatable.png

    Can't link you to the direct site, but this is the image that it looks like. Need the header and footer to only go out to the end of the table itself.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Do you mean the area with "show x entries" and the paging controls at the bottom of the table rather than the table header? If so, then just make your container smaller. Those elements always take up 100% width. You can modify them using CSS if you wish, but modifying the container and setting the table width to be 100% might be the easiest option.

    Allan
  • Nmastoris33Nmastoris33 Posts: 3Questions: 0Answers: 0
    Thanks for the help Allan.
This discussion has been closed.