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?
Announcement
Announcement Module
Collapse
No announcement yet.
is this when you should use tables?
Page Title Module
Move
Remove
Collapse
-
Tags: None
-
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.
-
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.
Comment
-
just curious how would you accomplish this? floating the li's i understand but how would you do this with 2 elements.Originally posted by Patrick ShannonYou 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.
(ie. name of dish, price of dish)
Comment
-
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...
Comment
-
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.Originally posted by jasonchanjust 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)
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, 04:17 PM.
Comment
Google search
Google search Module
Collapse
Latest Topics
Latest Topics Module
Collapse
-
Commented to College Kid Looking for Critiques on PortfolioLove your illustrations and your design work is great - especially if you've never studied!
-
Commented to LOL, the story of my life.Nice.
-
Commented to DIY Wedding InvitationsPhotoshop is not ideal, but if that is all you have, design at the correct size from the start, use CMYK, draw in crop marks outside kf the trim edge. Find out about bleed and supply with bleed if required....
-
Commented to DIY Wedding InvitationsI only have access to Adobe photo shop. I am going to convert it to a PDF after and send it to the printer
-
Commented to Yikes! What the heck happened to the forum?I just found a feature I had over looked on how to get to the last unread post in a thread. I give the solution at the following link.
http://www.graphicdesignforum.com/fo...44#post1513444 -
Commented to Todays Posts, New Posts problem solved (Sorta)I have had more time to explore the new forum features and will add a bit to this. After the results are loaded you will be presented with a list of posts that look like the graphic below with some icons...
-
Commented to Printers fault or mine? Please helpAs a printer, if I change a file for a design client, I know the color won't shift. But. If the design client sends an entirely new file, I check it to be sure the color won't shift. There are so many...
-
Thanks to Scribe and Longboy we have a couple of pretty effective workarounds. First create a couple of new bookmarks/favorites in you browser toolbar. Then add the following links to your new bookmarks....
All Creative World Network
All Creative World Network Module
Collapse

Comment