Change <td> width when using table class |
[eluser]max123[/eluser]
I want to have different <td> widths for different columns. How can i do it using table class. That class allows only to give a fixed <td> width for all <td> s. Thanx
[eluser]theprodigy[/eluser]
well, you can always extend the table class with your own version that allows you to pass in a td width (or array of options), or you can hand-code your tables. Other than those two options, I personally won't be able to help you as I haven't used that class before.
[eluser]flaky[/eluser]
http://ellislab.com/codeigniter/user-gui...table.html section: Changing the Look of Your Table
[eluser]elambiguo[/eluser]
[quote author="flaky" date="1263906523"]http://ellislab.com/codeigniter/user-gui...table.html section: Changing the Look of Your Table[/quote] flaky, the standard Table Class only permit one change for all <td>... the best option is make tables by hand or extend the original Class......
[eluser]elambiguo[/eluser]
[quote author="max123" date="1263903348"]I want to have different <td> widths for different columns. How can i do it using table class. That class allows only to give a fixed <td> width for all <td> s. Thanx[/quote] I have the same problem, and my solution (whitout complications) is hand-coded tables :-( The answer of @theprodigy is good too....
[eluser]max123[/eluser]
How can we inform these kind of issues to the codeigniter developers. So that they can fix this in the next release
[eluser]elambiguo[/eluser]
[quote author="max123" date="1263917451"]How can we inform these kind of issues to the codeigniter developers. So that they can fix this in the next release[/quote] Find for 'codeigniter 2.0' or 'codeigniter 2.1' in forums....
[eluser]Unknown[/eluser]
Simple solution works for me (based on the example in the CI manual): Basically, when setting the table template, set the 'heading_cell_start' tag to <th> = ''. (i.e. empty string) In the set_heading function include the <th> tags with width attributes when setting the header fields. I usually also set the 'heading_cell_end' tag to empty as well although it's not really necessary - I just personally find the header declaration easier to read when both opening and closing tags are in the set_heading function's field. Example (in a controller): Code: $this->load->library('table'); Cheers |
Welcome Guest, Not a member yet? Register Sign In |