www.webdeveloper.com
Results 1 to 5 of 5

Thread: Table Question

Hybrid View

  1. #1
    Join Date
    May 2010
    Posts
    133

    Table Question

    I have tabulated date of beverages with price and beverage. I need to position the price at far right. I don't know if I am doing it right with tables, I used mant td. Below is my code.

    Code:
    <table  cellspacing="0" cellpadding="0">
    			<tr>
    			    <td align="right"> <span class="menu_name">Classic Drinks</span></td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>	
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >80z</td><td>&nbsp;&nbsp;</td><td >120z</td>
    			</tr>
    			
    			<tr>
    			<td >Classic Drinks</td>
    			  <td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>	
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >&nbsp;</td><td >&nbsp;</td><td >&nbsp;</td>
    				<td >200.00</td><td>&nbsp;&nbsp;</td><td >300.00</td>
    			</tr>
    		</table>

    Below is what I want to achieve
    HTML Code:
    Classic Drink                                   80z            120z
    Regular Brew                                       68.00           168.00
    Decaf                                             178.00            98.00

  2. #2
    Join Date
    Mar 2012
    Posts
    1,118
    1. The column headers should be in a row of TH elements instead of TD ones.

    2. Why have you got so many TD elements in each table row? Your example needs just 3.

    3. You need to use CSS to control the layout of the table, particularly if you are using HTML5, as none of the HTML4 table attributes are valid in HTML5.

  3. #3
    Join Date
    Aug 2012
    Location
    Canada
    Posts
    56
    You do not use extra cells to do spacing, you use the tag definitions and styling to get the presentation you need.

    Perhaps the table article will help
    Cd&
    one of my toys And my repository and my old self ranting plus a bonus Getting the most out of Q/A sites
    Code that is 100% standards compliant is 100% correct 100% of the time... anything else is just a hack

  4. #4
    Join Date
    Nov 2012
    Posts
    450
    I think, he got the solution.

  5. #5
    Join Date
    Mar 2013
    Posts
    5
    I think you should use any HTML editing platform, if you will use any software for html editing so the mistakes will be less. I am using Dreamweaver and it's really a good HTML editing program. I hope it will also helpful for you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles