SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist kyllle's Avatar
    Join Date
    Jun 2008
    Posts
    469
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    best way to layout this text?

    Hi all,

    trying to refresh my memory of some css stuff having been ot of things for a while, can anyone recommend the best approach to achieve this layout

    Position image

    Kyle

  2. #2
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,816
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    First of all this looks like tabular data.. so this a case where you can use a table for your mark up.

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Untitled Document</title>
    
    <style>
    table{  font-family:Myriad Pro,Arial, Helvetica, sans-serif;  color:#900; border-spacing:0; border:none;text-align:left;}
    th{ font-weight:normal; width:5em; }
    th, td{ font-weight:normal; border:none; border-bottom:1px solid #900; padding-top:1em;}
    
    </style>
    </head>
    
    <body>
    <table width="200" border="1" cellspacing="10">
         <tr>
              <th width="84" scope="row">Name</th>
              <td width="76" scope="col">My Name</td>
         </tr>
         <tr>
              <th scope="row">Age</th>
              <td>21</td>
         </tr>
         <tr>
              <th scope="row">Gender</th>
              <td>Male</td>
         </tr>
    </table>
    </body>
    </html>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •