Jump to content


Photo
- - - - -

tables in pages and posts


  • Please log in to reply
1 reply to this topic

#1 tcooper007

tcooper007

    Newbie

  • Members
  • 2 posts

Posted 14 July 2011 - 08:43 AM

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

#2 tcooper007

tcooper007

    Newbie

  • Members
  • 2 posts

Posted 14 July 2011 - 09:03 AM

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