• 0
Sign in to follow this  
Followers 0

tables in pages and posts

Question

Posted · Report post

Hi Everyone, I am trying to put a table into a page and fix its width. However, what ever I put as table width is ignored and it is expanded to 100% width of the page. Here is an example of the code; <table width="100" border="1"> <tbody> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </tbody> </table> I am trying to understand how I can control this myself and do not want to use a table plug in as my tables will be generated from PHP code running queries from MySQL. I have had a dig around in Firebug and had a play around with creating <div> tags around my table but could not get it to work. So I assume Im not understanding something and you help would be appreciated. Thanks Trevor

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0

Posted · Report post

Hi I have found the solution for this; Here is example; <DIV STYLE="WIDTH: 200px; float: left; border: 1px;">

Content Goes here
</DIV> I was missing the STYLE="" within the <DIV> tag. Cheers Trevor

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0