Easy table question... indenting text

Discussion in 'Programming' started by lespaul00, Nov 18, 2007.

  1. #1
    Here's an easy table question...

    I have the following code for my table:
    <h1 align="center">Title</h1>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <cfoutput query="query1" group="OBJECT1">
       <tr>
       	   <h2><span class="style5">#OBJECT1#</span></h2>
       </tr>
       <tr>
       <cfoutput>
    
          	  <tr>
          	    <p>
          	         #OBJECT2#
       	        </p>
    </tr>
       </cfoutput>
       </tr>
    </cfoutput>
    </table>
    Code (markup):
    It outputs on my page hugging the left side of the page. I would like it indented a bit... (I thought cell padding would help this, but it did not). And I don't want to have to create another CSS for this.

    Thanks.
     
    lespaul00, Nov 18, 2007 IP
  2. unitedlocalbands

    unitedlocalbands Well-Known Member

    Messages:
    246
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    128
    #2
    I dont think you will be able to do this with the width set to %100.

    I have found that tables are better for organizing information in relation to how it apears to its self, rather than how it apears on the page.

    A well writen css id with a div tag seems to be the best way to postion content on the page.

    Then the table can handel how the information from the database apears.

    I'm still learning a lot about it though. Hopefully someone else will comment with some better advise.

    I get just about all my Css formating from this website.

    Its free and cross browser friendly.

    http://www.code-sucks.com/
     
    unitedlocalbands, Nov 18, 2007 IP