layouting database-generated content page with CSS

Discussion in 'CSS' started by mol, Nov 9, 2007.

  1. #1
    Hi all,

    I'm new in php and mysql,

    I have a web page which the content I get from database, the content I put into table which the table generated from php.
    How can I align the table to left, right, up , bottom using CSS ?

    many thanks
     
    mol, Nov 9, 2007 IP
  2. webdesigner

    webdesigner Well-Known Member

    Messages:
    489
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Just give the table a class or ID and style it through your stylesheet. See example below

    HTML
    
    <table id="table">
    <tr>
    <td></td>
    </tr>
    </table>
    
    Code (markup):
    CSS
    
     #table  {
     width: 500px;
     margin:0 auto;
    }
    
    Code (markup):
     
    webdesigner, Nov 9, 2007 IP
  3. mol

    mol Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    many thanx guy
     
    mol, Nov 11, 2007 IP