SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Jun 25, 2008, 14:21 #1
HTML The best way to align fields in tables?
Hi i have made some tables with data in,
and i was wondering the best way/ code i should be using to automatically align them up
http://murraysofclevedon.co.uk/sardinia.html
or should i just use <br>'s?
any help/ links / codes is much appreciated
thanks K.
-
Jun 25, 2008, 15:28 #2
- Join Date
- May 2006
- Location
- Lancaster University, UK
- Posts
- 7,062
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Mods please move to design.
Don't use <br />s for design alignment - use CSS margins.Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
-
Jun 25, 2008, 22:41 #3
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Instead of a single row with an unordered list in each column, you should mark this up as a proper table with one row per wine. For example,
Code HTML4Strict:<table> <caption>Red Wine</caption> <thead> <tr> <th>Wine</th> <th>Size</th> <th>£ Unit</th> </tr> </thead> <tbody> <tr> <td>Grotta Rossa Carignano Del Sulcis 2005 Santadi</td> <td>75 cl</td> <td>9.90</td> </tr> <tr> <td>Rocca Rubia Carignano Del Sulcis Riserva 2003 Santadi</td> <td>75 cl</td> <td>18.50</td> </tr> <tr> <td>Terre Brune 2002 Santadi</td> <td>75 cl</td> <td>40.00</td> </tr> <tr> <td>Montessu Isola Del Nuraghi 2005 Agricola Punica</td> <td>75 cl</td> <td>30.00</td> </tr> <tr> <td>Barrua 2003 Agricola Punica</td> <td>75 cl</td> <td>?</td> </tr> </tbody> </table>
Then use CSS to format the table and the cell contents.Birnam wood is come to Dunsinane
Bookmarks