Help with code???

Discussion in 'HTML & Website Design' started by Ash1402, Aug 26, 2008.

  1. #1
    I have some code (Below) I would like to compress this code smaller than my site shows it and make it go inside a box. I have tried with tables and such but I think it is my blog template messing things up... could you help me out?

    <table class="tablepost" style="text-align: left;" border="0">
    <tbody>
    <tr>
    <td width="100">
    <h4>Date:</h4>
    </td>
    <td width="340">September 6, 2008</td>
    </tr>
    <tr>
    <td>
    <h4>Time</h4>
    </td>
    <td>10ET/7PT</td>
    </tr>
    <tr>
    <td>
    <h4>Broadcast:</h4>
    </td>
    <td>PPV</td>
    </tr>
    <tr>
    <td>
    <h4>Venue:</h4>
    </td>
    <td>Phillips Arena in Atlanta, Ga</td>
    </tr>
    <tr>
    <td>
    <h4>Main Event:</h4>
    </td>
    <td>Chuck Liddell Vs. Rashad Evans</td>
    </tr>
    </tbody></table>
    Code (markup):
    Basically right now this is shown as being spread out text surrounded by nothing. Looks like printing excell out without lines on. Any help to bring it together and place a box behind it with some sort of BG color would be great!

    Thanks,
    Ash
     
    Ash1402, Aug 26, 2008 IP
  2. john_logic

    john_logic Guest

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    the text is surrounded by nothing because you have given border="0"
    for help on setting values for your tables:
    http://www(dot)w3schools(dot)com/html/html_tables.asp
    http://www(dot)w3schools(dot)com/css/css_table.asp

    setting a background colour for your table should be as simple as

    .tablepost {
    background-color: blue;
    }

    in your CSS
     
    john_logic, Aug 27, 2008 IP
  3. prosense

    prosense Guest

    Messages:
    109
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    *-*the first solution is to change the border of the table to 1 or higher.

    *-*the second solution is to put your code between:-
    
    <textarea>  Your Code Here  </textarea>
    
    PHP:
     
    prosense, Aug 27, 2008 IP