Limit width of HTML table

sicilian97

New Member
I'm trying to write a table so that it doesn't expand to the full width of the page. Below is what I have so far, but even though the first columns seem to respect the "width" parameter, the last column expands to the end of the page.All results I found use CSS, but I am not sure how to do that. I don't know if it's relevant, but I'm writing a Joomla! article.\[code\]<table class="zebra" width="300"> <thead> <tr> <th style="text-align: left;" width="100">title 1</th> <th style="text-align: center;" width="100">title 2</th> <th style="text-align: center;" width="100">title 3</th></tr> </thead> <tbody> <tr class="odd"> <td style="text-align: left;" width="100">content 1</td> <td style="text-align: center;" width="100">content 2</td> <td style="text-align: center;" width="100">content 3</td> </tr> </tbody></table>\[/code\]
 
Back
Top