+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 26




Tables and Divisions

This is a discussion on Tables and Divisions within the CSS Forum, part of the Web Design Forum category; No, do that with CSS and xHTML....

  1. #11
    CSS Wizardry Harry's Avatar
    Join Date
    May 2007
    Location
    Leeds, England
    Posts
    13,655
    No, do that with CSS and xHTML.




  2. #12
    Antibacterial lysol's Avatar
    Join Date
    Dec 2008
    Location
    Washington, DC
    Posts
    29
    You can use tables for data, and for a small example, lets use a Calendar.

    With that Calendar, you have rows and colums created with tables. You code it with css to layout the design, and use php/mysql for the dynamic data. Your page would be a php extension page. What does xHTML have to do with it?




  3. #13
    CSS Wizardry Harry's Avatar
    Join Date
    May 2007
    Location
    Leeds, England
    Posts
    13,655
    A calendar is a great example. But the menu you mentioned shouldn't be done with tables. A menu is a list if anything.




  4. #14
    Antibacterial lysol's Avatar
    Join Date
    Dec 2008
    Location
    Washington, DC
    Posts
    29
    True. But when you have a menu, even setting it as a list, its a pain to go into making changes, which is why its great to use PHP. The menu data is contained in the database, and all you have to do is go into your phpmyadmin, edit add, delete menu items. The table row becomes repeated, only 1 row. you don't have to create more rows or columns, it would just repeat the php code within 1 row without sacrificing more tabular mumbo jumbo.

    just giving my personal opinion as its a pain to have clients call me and want to make changes. Why bother? PHP that website, and let them change it.




  5. #15
    CSS Wizardry Harry's Avatar
    Join Date
    May 2007
    Location
    Leeds, England
    Posts
    13,655
    Yeah, style it in HTML, populate it with PHP. Just don't use a table for it.




  6. #16
    Antibacterial lysol's Avatar
    Join Date
    Dec 2008
    Location
    Washington, DC
    Posts
    29
    and i meant, a restaurant menu (especially big menu's). I hope I didn't confuse anyone.




  7. #17
    CSS Wizardry Harry's Avatar
    Join Date
    May 2007
    Location
    Leeds, England
    Posts
    13,655
    Yeah, you can code the skeleton of a food menu with a
      and then run a PHP foreach loop inside that for every
    • , putting in the dish title, a description and price from a variable pulled from a database.




  8. #18
    Antibacterial lysol's Avatar
    Join Date
    Dec 2008
    Location
    Washington, DC
    Posts
    29
    Erm, not exactly.

    Not a navigation menu. Im talking about a restaurants menu.

    example (not too table shabby)

    Our Beef Burgers (<th>)
    <tr>
    <td>burger type</td>
    <td>Price</td>
    </tr><?php> (php code starts)
    <tr>
    <td>...php code...</td>
    <td>...php code...</td>
    </tr>
    <? php code > (this code gets the menu data and sets the table to repeat downward).
    Last edited by lysol; 10-12-2008 at 10:04 PM.




  9. #19
    CSS Wizardry Harry's Avatar
    Join Date
    May 2007
    Location
    Leeds, England
    Posts
    13,655
    I've coded this up:

    PHP Code:
    <?php
        
        $mains 
    = array(
            array(
                
    'Shitake, Portobello, button & oyster mushrooms (v)',
                
    '&pound;10.50',
                
    '& leeks with blue cheese guacamole & home-made salsa'
            
    ),
            array(
                
    'Chicken fillet strips',
                
    '&pound;12.50',
                
    'with lemon & paprika, creamy guacamole & home-made salsa'
            
    ),
            array(
                
    'Flame-grilled sirloin steak',
                
    '&pound;13.50',
                
    'with horseradish guacamole & salsa Criollo'
            
    )
        );
        
    ?>
    <dl>
        <?php
            
            
    foreach($mains as $mainsItem){
                echo 
    '<dt><strong>'.$mainsItem[0].'</strong> <span>'.$mainsItem[1].'</span></dt>'."\n".'<dd>'.$mainsItem[2].'</dd>';
            }
            
        
    ?>
    </dl>
    I used an array because I don't know SQL, but the idea is exactly the same, load a series of PHP variables from some data (wherever it's stored) and put it into a PHP foreach inside a
    (semantically perfect and infinitely better than a table)!

    See a demo here: Restaurant Menu | CSS




  10. #20
    Antibacterial lysol's Avatar
    Join Date
    Dec 2008
    Location
    Washington, DC
    Posts
    29
    hmmm...

    well you see, i like that idea. Ill have to see how I can work around that. Looks good though. Thanks for the heads up.




+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast






Similar Threads

  1. Help with Tables!
    By RJC in forum CSS Forum
    Replies: 10
    Last Post: 05-11-2008, 01:20 AM
  2. Are tables unprofessional?
    By jonze in forum General Web Design Forum
    Replies: 12
    Last Post: 15-08-2008, 05:22 PM
  3. Tables and Css style
    By SilverShadow in forum CSS Forum
    Replies: 1
    Last Post: 15-05-2008, 11:59 AM
  4. No Tables
    By Miss Leona in forum CSS Forum
    Replies: 12
    Last Post: 20-02-2008, 07:15 AM
  5. CSS vs HTML Tables
    By Talks_44 in forum CSS Forum
    Replies: 11
    Last Post: 21-09-2007, 11:49 PM

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


Free Decent Downloads Free Quality Wallpapers Graphics Forum Free Vista Themes
The Top The Best Images Logo Design - $149 Affordable Stock Vector Illustrations Creativecurio - Design Blog Graphic Design Advertising

Check the forum often for the latest design announcements. Everything from graphic design and web design, to films and music.
Estetica is a great place for people to get together and help each other out.


Web Hosting - UK Web Hosting services for business or personal website hosting needs.


Dedicated Servers - A full range of Managed Dedicated Server solutions suitable for all your requirements.


Online Backup – Backup Technology offers competitive online backup, disaster recovery and business continuity.


Web Design UK | Vision.To Design | Leaflet Printing | Estetica Design Forum's Privacy Policy | Pocono Web | Flyer Printing | Photography Blog | Graphic Design Links


Graphic Design Social Network | Logo Design | Brochure Printing | Land for sale | Leaflet Printing | CNC Precision Engineering | Graphic Design Blog


Custom Logo Design - $149 Only | Affordable Print Design Templates | Small Business Logo Design | Company Logo Design


Logo Design Service | Logo Design Firm | Logo Design Reseller | Custom Logo Design | Letterhead Printing | Flyer Printing | Business Card Printing


Online Backup | T-Shirt Printing | Personalised Mugs | Canvas Printing | Tradeshow Ideas