I find it hard to give a yes or no answer. See, you will use CSS for styling the design, (X)HTML for the mark up, which structures your document, and this depends on your requirements.

Recipes consists of different forms of data. You have ingredients, instructions, etc..., and every form, will require its own mark up type, as to mark the documents logical structure (hence mark up language).

Ingredients can be seen as a list, or a table. It is totally up to you, if you mark your content up as a list or a table, both represent the logical structure of the content. For example ingredients are as much tabular data [1], with rows for each ingredient, and columns for each element of an ingredient (name, description, amount), as well as simply a list of ingredients. I would recommend a table in this instance, but it is up to the document designer.

Further, you can wrap the whole recipe in a div, containing a table for ingredients and a separate div surrounding including the recipe steps (which again could be a list), or you can pack it all into a definition list, the name of the recipe being the defined term [dt], and every other element of the recipe contained in a definition description [dd].

You see there are multiple ways to mark up and style your document, which is totally up to your taste and understanding of a documents logic.

====
My recommended mark-up:

<dl class="recipe" id="RecipeName">
 <dt>Recipe Name or Title</dt>
 <dd>
   Brief summary/description of the recipes outcome.
 </dd>
 <dd>
   <table class="ingredients">
     <caption>Ingredients</caption>
     <thead>
       <th>Name</th>
       <th>Description</th>
       <th>Amount</th>
     </thead>
     <tbody>
       <tr>
         <td>
....
   </table>
 </dd>
 <dd>
   Recipe Steps:
   <ol>
     <li>First step.....</li>
.....
   </ol>
 </dd>
</dl>

====

If you are interested in how to style tabulated data, you might want to take a look at a new project started by the list member Chris Heilman (http://icant.co.uk/csstablegallery/index.php), which collects and displays a variety of CSS styles, for creating beautified HTML tables for tabulated data.

Hope this helps...

----------------

[1] tabular data == data which is best presented in a grid form, to underline the datas inherent logic by exploiting the grids column and row nature


Sam Leathers wrote:

I'm getting ready to build a recipe database interfaced with php. Would
a recipe card make more sense to be displayed in a table, or using css?
If using css how would you break it up, would you have a separate div
for title, ingredients, and instructions?

I'm just trying to figure out how I want it to look before I even go
about coding the php to interface with the database. Any comments would
be very helpful.

Sam

in life, direction is everything, distance is secondary--so keep your
bearings!

[KJV] Luke 5:16 And he withdrew himself into the wilderness, and prayed.

Get Firefox!!!
http://www.spreadfirefox.com/?q=affiliates&amp;id=13731&amp;t=1
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/




______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to