A Choice for Unordered Lists

S

sorry.no.email

Hi,

I have several short lists (about 10 to 20 lines each) that at the
moment are simply set up with <br /> tags.

Are there any advantages to changing these to unordered lists by
adding something like this to my CSS and applying a class:

.ul-nobullets {
list-style-type: none;
padding: 0;
margin: 0;

}

Certainly it appears more elegant with CSS and I suspect reflects
more accurately the nature of the list. Perhaps this is enough? Or
does it actually make no difference?

Thanks to all who help,

Andrew.
 
B

Barbara de Zoete

I have several short lists (about 10 to 20 lines each) that at the
moment are simply set up with <br /> tags.

Then it is not a list.
Are there any advantages to changing these to unordered lists

Of course there is the advantage that all of a sudden it *is* a list then.

by adding something like this to my CSS and applying a class:

.ul-nobullets {

I would create selectors for class names that have any relevance as to
*why* you want the content that it effects to have a different look. What
if later on you decide to do bullets? The class name with 'nobullets' in
it gets useles.
 
S

sorry.no.email

Hi,

I have several short lists (about 10 to 20 lines each) that at the
moment are simply set up with <br /> tags.

Are there any advantages to changing these to unordered lists by
adding something like this to my CSS and applying a class:

.ul-nobullets {
list-style-type: none;
padding: 0;
margin: 0;

}

Certainly it appears more elegant with CSS and I suspect reflects
more accurately the nature of the list. Perhaps this is enough? Or
does it actually make no difference?

Thanks to all who help,

Andrew.

Oops!!

Another few minutes stfw and I found much of my answer on:

http://www.xml.com/pub/a/2003/04/16/dive-into.html

Sorry!

Andrew.
 
S

sorry.no.email

Then it is not a list.


Of course there is the advantage that all of a sudden it *is* a list then.



I would create selectors for class names that have any relevance as to
*why* you want the content that it effects to have a different look. What
if later on you decide to do bullets? The class name with 'nobullets' in
it gets useles.

Hi Barbara,

Thanks for your comments which as usual are very direct and always
useful :)

I guess what I wanted to do was create a specific look for Birth
Death and Marriage list data on a genealogy site, a type of list that
is found many times across the site.

Initially this involved no bullets or indents, hence the poor choice
of name but I guess later will involve other changes so more
accurately the selector should be .ul-birthdata for example.

Have I understand your comments accurately?

Andrew.
 
D

Dylan Parry

Pondering the eternal question of "Hobnobs or Rich Tea?",
sorry.no.email@post_NG.com finally proclaimed:
more accurately the selector should be .ul-birthdata for example.

How about using "ul.birthdata" or just ".birthdata"? I don't think that
hyphens are allowed in selector names anyway, or at least some browsers
have problems with them.
 
A

Alan J. Flavell

I don't think that hyphens are allowed in selector names anyway,

You're entirely at liberty to consult the various applicable
specifications, you know, before sharing your confusion with others.
or at least some browsers have problems with them.

I suspect you're confuddling it with underscores.

CSS/2, as originally formulated, specified that underscores were
not allowed in identifiers. Therefore, browsers implemented according
to the specification were *required*, by the CSS error handling
specifications, to ignore identifiers which contained underscores.

Far from "having problems with" underscores, browsers which treated
them as syntax errors, and treated them in accordance with the CSS
rules for handling errors (i.e ignoring the associated part of the
CSS) were behaving correctly, whereas those which erroneously accepted
them were in violation of the specification.

Later, W3C mischievously slipped-in a substantive change to the
specification via the "errata" - see
http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html#x3
- but without making any change to the CSS version (2).

It's impossible for a browser to conform to both CSS2 (as published)
and CSS2 (errata), since they are contradictory.

They really should have confined the CSS2 "errata" to editorial
corrections, or resolving genuine ambiguities in the wording, and left
any substantive change of the specification for a later version (a
hypothetical /2.01, or something). That's past history now - but it's
to be hoped they don't play that kind of trick again.
 
D

dorayme

Barbara de Zoete said:
Then it is not a list.

This is too much! It is a list in ordinary terms and this is
exactly what the OP meant. He is, as you know, asking about html
lists (on which, I know, you do have good advice.)
Of course there is the advantage that all of a sudden it *is* a list then.

The advantage is actually this: if you mark up lists of things
(there, you see, Barbara, I said something you deny is correct )
with html lists, ie. <li>s and associated markup, you gain a
uniform power over them. Many lists can simply be marked up as

<ul>
<li>Link or otherwise</li>
<li>Link or otherwise</li>
....
</ul>

as you make up a site. It is a simple rule. You later can turn
your mind to style these in css by way of assigning styles to
ul's and li's or to various classes, ids that they can then be
assigned. You can also change these styles to change the
appearance in later revisions or updates of the site.
I would create selectors for class names that have any relevance as to
*why* you want the content that it effects to have a different look. What
if later on you decide to do bullets? The class name with 'nobullets' in
it gets useles.

This is quite difficult advice to follow in practice. It is just
simply a fact that quite often website makers have no particular
quite general reason to make a list look one way or another.
Sometimes the content of the whole page or other elements dictate
a choice. It is hard to generalise at the beginning.

So go ahead and use appearance names to get going and later see
if there is a more underlying thing that links all the lists of
that appearance. Like that they are lists of bookmarks or places
to visit by bus or countries that are good to walk in. At first
you might not know, but then discover that you are tending to
make such lists with special types of bullets. Then you can class
the lot under a name that reflects what might be an underlying
general pattern.

You will find that the advice that folk here give often fails to
take into account the difference between the finished product
(which is used to show the site, also to what you turn when you
update or revise the site or give it to someone else) and the
actual process of making it. These are different things and it is
a confusion to conflate the two.
 
A

Andrew

Hi,

I have several short lists (about 10 to 20 lines each) that at the
moment are simply set up with <br /> tags.

Are there any advantages to changing these to unordered lists by
adding something like this to my CSS and applying a class:

.ul-nobullets {
list-style-type: none;
padding: 0;
margin: 0;

}

Certainly it appears more elegant with CSS and I suspect reflects
more accurately the nature of the list. Perhaps this is enough? Or
does it actually make no difference?

Thanks to all who help,

Andrew.

Hi Andrew,

Test!

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top