Announcement Announcement Module
Collapse
No announcement yet.
is this when you should use tables? Page Title Module
Move Remove Collapse
Search Search Module
Collapse

Advertisement Advertisement Module
Collapse

Featured Images Featured Images Module
Collapse

Mediabistro Creative Sites Mediabistro Creative Sites Module
Collapse
Latest Topics Latest Topics Module
Collapse

  • PrintDriver
    Reply to How to imitate this crackle design/texture for a T-shirt?
    PrintDriver
    If you are silkscreening this, taking it into Photoshop isn't a very good idea. When designing T-shirts for silk screening you have to keep the color separations in mind. One color is easy from Photoshop....
    Today, 01:48 PM
  • kemingMatters
    Reply to Unused designs - who owns them?
    kemingMatters
    IMHO selling your unused ideas is akin to a carpenter selling off scraps and sawdust to a pressboard manufacturer. Your unused ideas/concepts are byproducts of the project your client hired you to co...
    Today, 01:44 PM
  • hank_scorpio
    Reply to Working on a logo for myself
    hank_scorpio
    I don't particularly like any of those birds, it's not really the style I wanted.

    I agree the typography is out of place but the text is just a placeholder for now.

    I'll try...
    Today, 01:39 PM
  • KitchWitch
    Reply to Oh Portland!
    KitchWitch
    Hi Megoggsc and welcome to GDF.

    We ask all new members to read very important links here and here. These explain the rules, how the forum runs and a few inside jokes. No, you haven't done...
    Today, 01:37 PM
  • KitchWitch
    Comment on Delete post from years ago
    KitchWitch
    In the Portland thread? A mod can remove the links for you. Do you want both of those links removed?
    Today, 01:36 PM
Advertisement Advertisement Module
Collapse

Sponsors Sponsors Module
Collapse

X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • is this when you should use tables?

    im creating a restaurant site where ill have a menu page. I was thinkin listing the dishes with a <ul> or <ol> tag but how would i also include the prices to the right of the items? should i just use a 2 col table to accomplish this? im really tryin to stay away from tables by all means necessary but is this the case when i am forced to use them? what do you guys suggest?

  • #2
    You could either float the <li>'s within the <ul>/<ol> tags, or use a definition list in the same way. It'd be less code to do so.

    Tables are fine when they're used for tabular data, and this may qualify if you wanted to go that route anyway.

    Comment


    • #3
      Id definately recommend using tables here. This way, you will ensure that in every size browser, your prices will still be next to the correct item. If you float <div> tags, the overflow of your text could misalign your prices.
      www.jackiecreative.com

      People who live in glass houses sink ships.

      Comment


      • #4
        Originally posted by Patrick Shannon
        You could either float the <li>'s within the <ul>/<ol> tags, or use a definition list in the same way. It'd be less code to do so.

        Tables are fine when they're used for tabular data, and this may qualify if you wanted to go that route anyway.
        just curious how would you accomplish this? floating the li's i understand but how would you do this with 2 elements.

        (ie. name of dish, price of dish)

        Comment


        • #5
          you could do something like:

          <li>name of dish<span>price of dish</span><br /></li>

          and float the name left and the price right, using the break to clear your floats...they'll both stay on the same line that way...until they resize the text enough to make it wrap that is...
          Monarchs Rule!

          Comment


          • #6
            Originally posted by jasonchan
            just curious how would you accomplish this? floating the li's i understand but how would you do this with 2 elements.

            (ie. name of dish, price of dish)
            Well, if it's within a contained area like 300px (just to throw a number out) and you floated two <li>s at 150px (or a little smaller since IE can't get anything right) within, then it should all fall into place.

            But what Jackimalyn just said is correct, if the text goes bigger than the width of the column then that could drastically throw things off. Might just be easier to go with a table, it's not as if you're using it for design or anything.

            Although flutterby's suggeestion isn't bad with some modification. We tend to style our forms like this....

            <ul>
            <li><label>Whatever</label> <span> blah</span></li>
            </ul>

            Then you could use CSS on the various tags to make it do what you want and the <li>s take care of spacing between the elements, etc. Don't even need break tags.

            I would only avoid the table if you can foresee a situation in the future that heavily involves rearranging the way the data is laid out. Otherwise, table away, it's more predictable.
            Last edited by Patrick Shannon; 05-08-2007, 05:17 PM.

            Comment

            Mediabistro A division of Prometheus Global Media home | site map | advertising/sponsorships | careers | contact us | help courses | browse jobs | freelancers | content | member benefits | reprints & permissions terms of use | privacy policy Copyright © 2014 Mediabistro Inc.
            Working...
            X