Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css addresses listing

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
I am a bit confused about the id that you should preferable not use tables to lay out. What is the default advice to do when I use listings like addresses. If I should not use tables, must I do it all with <div> and <span> ?
 
Hi

If that address list is organized as tabular data, for example
[tt]
+-----------------+-----------------+------------+
| Address | Name | Role |
+-----------------+-----------------+------------+
| me@example.com | Feherke | master |
| you@example.com | MatrixIndicator | apprentice |
+-----------------+-----------------+------------+
[/tt]
then use [tt]table[/tt].

If that address list is organized as simple list, for example
[tt]
* me@example.com
* you@example.com
[/tt]
then use [tt]ul[/tt] or [tt]ol[/tt].

If that address list is organized as detailed list, for example
[tt]
me@example.com
Feherke
you@example.com
MatrixIndicator
[/tt]
then use [tt]dl[/tt]. ( Note that I do not really like this one idea. )

Otherwise give us more details about what you have to display.


Feherke.
 
My addresses are presented similar like your above example. So I should not use div and span
 
matrixindicator, as feherke stated, it is important to know how to semantically describe your addresses. Is it a table of addresses or a list, is it ordered list or unordered and so on? This will tell you the right element to use for the job.

Divs and spans are blocks and inline elements that have no semantic meaning. They are simply elements that help you control the layout. So you should always avoid using them beyond denoting building blocks of your website (like header, navigation, footer, etc.).

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Thanks to all for your response. Confused, because I heard that the old fashion way to lay-out with table was not done anymore. But if I make a resume to myself. If the data are like in a table, you should use this one and for general lay-out principles you should use div and so on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top