-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed table column width. How? #863
Comments
<style>
table { table-layout: fixed; }
table th, table td { overflow: hidden; }
</style>
<table class="span12">
<thead>
<tr>
<th style="width: 30%">Col 1</th>
<th style="width: 20%">Col 2</th>
<th style="width: 10%">Col 3</th>
<th style="width: 30%">Col 4</th>
<th style="width: 10%">Col 5</th>
</tr>
</thead>
<tbody>
<tr>
<td>Val 1</th>
<td>Val 2</th>
<td>Val 3</th>
<td>Val 4</th>
<td>Val 5</th>
</tr>
</tbody>
</table> |
@jasny Thanks.. Its working. But i still have problem. Its not working when i have lengthy text in the cell. Is there a way to hide the overflow text?.I tried overflow:hidden; But its not working. |
@jasny Thanks once again. I added style="table-layout: fixed;" and applied overflow:hidden; in the td. Now its working. :) |
@viruthagiri I've changed the example. Have a look. @fat This isn't really an issue, please close it. |
Thanks |
thanks for the help @jasny! |
@jasny thanks! |
Finally found an answer!! Thanks !! |
Thanks |
Thanks @jasny ! Was looking out for this answer for quite a while. |
Same here, thanks @jasny. I spent 15 minutes digging through BS determined to find a helper class that did this... guess i'll make my own haha. |
Thanks |
thanks ! |
Can anyone tell me how to give fixed table column width.
I have five columns. I want like 30%,20%,10%,30%,10% Can anyone help me? Thanks
The text was updated successfully, but these errors were encountered: