html - How can I wrap a data inside a cell? -
this project in asp mvc 4 i'm trying retrieve data database displayed on table wont break word , consumes whole row sample image:
http://animobile.info/upload/1/wontwrap.jpg
i've tried code:
<table cellpadding="0" cellspacing="0" border="0" class="display" id="myexchangeratetable" width="100"> <thead> <tr> <th> @html.displaynamefor(model => model.backup_location)     @html.displaynamefor(model => model.backup_taken) @html.displaynamefor(model => model.restore_database_name) @html.displaynamefor(model => model.date_restored) </th> <th></th> </tr> </thead> @foreach (var item in model) { <tbody align="left"> <tr> <td style="word-wrap: break-word"> @html.displayfor(model => item.backup_location) </td> <td> @html.displayfor(modelitem => item.backup_taken)</td> <td> @html.displayfor(modelitem => item.restore_database_name)</td> <td> @html.displayfor(modelitem => item.date_restored)</td> </tr> </tbody> } </table>
please thank much!
try : in gridmvc.css comment /white-space: nowrap;/ , /min-height: 22px;/
just :
table.grid-table td { margin: 2px 6px 2px 6px; padding: 1px 6px 1px 6px; /*min-height: 22px;*/ } table.grid-table tr:nth-child(odd) td { background: #e3fdf2; border: 1px solid #ada7a7; /*white-space: nowrap;*/ } table.grid-table tr:nth-child(even) td { background: white; border: 1px solid #ada7a7; /*white-space: nowrap;*/ }
Comments
Post a Comment