469,267 Members | 1,643 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,267 developers. It's quick & easy.

Hyphen Bullet

I would like to set the "list-style-type" to be a hyphen (-). How can I
accomplish this in a style sheet. I tried list-style-type: hyphen; and
list-style-type: dash; but neither worked. I also tried adding this to
the style sheet (with the list-style-type set to none in the UL
element).

LI:Before
{
content: "- ";
}

If someone has a solution to this please supply the proper syntax. That
may be what my issue is right now. Thanks.

Oct 5 '05 #1
13 49129


Matt wrote:
I would like to set the "list-style-type" to be a hyphen (-). How can I
accomplish this in a style sheet. I tried list-style-type: hyphen; and
list-style-type: dash; but neither worked.


This <http://www.w3.org/TR/CSS21/generate.html#lists> lists the possible
values for list-style-type that browsers should support.

Here
<http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/liststyletype.asp>
is what IE supports.

The only glyphs according to CSS 2.1 are disc, circle, and square, I
don't think hypen or dash are supported.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 5 '05 #2
"Matt" <ma***********@manning-napier.com> wrote:
I would like to set the "list-style-type" to be a hyphen (-).
That's odd, because style guides usually recommend the use of a dash, which
is rather different visually and corresponds to established typographic
tradition. Anyway, you would have the same problem with a dash, or with any
_character_ for that matter.
How can I accomplish this in a style sheet.
In HTML authoring, the best shot is to use images as list bullets, using an
image that looks sufficiently like the character you want. It's awkward and
inflexible, as you may guess.
I tried list-style-type: hyphen; and
list-style-type: dash; but neither worked.
No wonder. You can't just invent CSS constructs as you go.
I also tried adding this to
the style sheet (with the list-style-type set to none in the UL
element).

LI:Before
{
content: "- ";
}


That would be fine, it browsers supported it. Opera does, but otherwise the
situation is poor: browsers usually obey list-style-type: none but ignore
the rule with LI:Before, since they don't support generated content or
associated constructs.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Oct 6 '05 #3
On Thu, 6 Oct 2005, Jukka K. Korpela wrote:
I would like to set the "list-style-type" to be a hyphen (-).


That's odd, because style guides usually recommend the use of a dash, which
is rather different visually and corresponds to established typographic
tradition.


Perhaps he meant the $Subject :
http://ppewww.ph.gla.ac.uk/~flavell/...a20.html#x2043

Oct 6 '05 #4
Matt wrote:
I would like to set the "list-style-type" to be a hyphen (-). How can I
accomplish this in a style sheet. I tried list-style-type: hyphen; and
list-style-type: dash; but neither worked.
I wonder what you'd have expected list-style-type: hippopotamus; to do.
You can't just make up your own CSS!

I also tried adding this to the style sheet (with the list-style-type set to none in the UL
element).

LI:Before
{
content: "- ";
}


IE doesn't do :before or :after.
Oct 6 '05 #5
On Thu, 6 Oct 2005, Harlan Messinger wrote:
I wonder what you'd have expected list-style-type: hippopotamus; to
do.


A heavy pet, probably. SCNR

Oct 6 '05 #6
Andreas Prilop <nh******@rrzn-user.uni-hannover.de> wrote:
On Thu, 6 Oct 2005, Jukka K. Korpela wrote:
I would like to set the "list-style-type" to be a hyphen (-).


That's odd, because style guides usually recommend the use of a dash,
which is rather different visually and corresponds to established
typographic tradition.


Perhaps he meant the $Subject :
http://ppewww.ph.gla.ac.uk/~flavell/...a20.html#x2043


Well, he wrote _twice_ (in prose and in CSS) the ASCII hyphen-minus "-",
commonly known as hyphen, and if he had meant the hyphen bullet U+2043, he
would surely have used \u2043 in CSS.

But I just realized that the hyphen bullet is not mentioned among the
dash-like characters in the Unicode standard, even though the hyphen-minus
is. There's no cross reference in the description of the hyphen bullet in
the code chart.

It seems that the hyphen bullet is really meant to be a bullet character
that looks like a hyphen (of a kind), rather than a hyphen used as a
bullet. Yes, splitting hairs - I've spent too much time with character
standards I'm afraid.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Oct 6 '05 #7
On Thu, 6 Oct 2005 14:25:54 +0000 (UTC) in
comp.infosystems.www.authoring.stylesheets, Jukka K. Korpela favored
us with...
That's odd, because style guides usually recommend the use of a dash,


I don't think so.

If a majority of style guides recommended a dash instead of a bullet,
it would be called a dashed list and not a bulleted list.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Oct 6 '05 #8
On Thu, 6 Oct 2005, Jukka K. Korpela wrote:
It seems that the hyphen bullet is really meant to be a bullet character
that looks like a hyphen (of a kind),
That's why it's called "hyphen bullet".
rather than a hyphen used as a bullet.


Then the name would be "bullet hyphen".

On the other hand, "hyphen-minus" is written with hyphen-minus
is written with hyphen-minus is ... STOP! ... meaning that this
character is equally a hyphen and a minus.

;-)

Oct 7 '05 #9
Harlan Messinger wrote:
I wonder what you'd have expected list-style-type: hippopotamus; to do.
I think it's in the feature list for IE7
You can't just make up your own CSS!


Bill can.

Oct 7 '05 #10
Stan Brown <th************@fastmail.fm> wrote:
That's odd, because style guides usually recommend the use of a dash,
I don't think so.


OK, let's say that good old style guides recommend the use of a dash for an
itemized list, to the extent that itemized lists are used at all. Lists are
not common in good old style, and as they became popular due to word
processors, presentation graphics software, etc., they became bulleted.
HTML browsers followed suit. The sad thing is that CSS doesn't let you
simply change the marker _character_, only select between a few
presentation-graphics-like bullet styles or use an image.
If a majority of style guides recommended a dash instead of a bullet,
it would be called a dashed list and not a bulleted list.


It's an itemized list. The HTML tag name ul, for "unnumbered list", is a
poor compromise between an appropriate structural description and a
presentational name.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Oct 7 '05 #11
On Fri, 7 Oct 2005, Jukka K. Korpela wrote:
The HTML tag name ul, for "unnumbered list", is a poor compromise
between an appropriate structural description and a presentational
name.


Except that "ul" is specified to mean "unordered list", not
"unnumbered list".

Though, now that the issue has been raised, I must admit that far too
many of my own <ul> lists would make less sense if the items were to
be put into a different order. One day I suppose I should go through
and correct those where the sequence of items is significant.
Oct 10 '05 #12
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> wrote:
On Fri, 7 Oct 2005, Jukka K. Korpela wrote:
The HTML tag name ul, for "unnumbered list", is a poor compromise
between an appropriate structural description and a presentational
name.
Except that "ul" is specified to mean "unordered list", not
"unnumbered list".


Yes, but people (including me) generally read it as "unordered in the sense
that the order is not emphasized with numbers". I would say that it would
be incorrect, at least on practical grounds, for a browser to render the
<li> elements of a <ul> element in an order that deviates from their order
in the HTML source. Much like a browser should not reorder the rows of a
table, although there is no explicit rule against that.

The <ol> and <ul> elements are really two kinds of list much the same way
as you can style a list in a word processor to use numbers or bullets. In
CSS, you can make an <ol> bulleted or a <ul> numbered (though I wouldn't
normally do so).
Though, now that the issue has been raised, I must admit that far too
many of my own <ul> lists would make less sense if the items were to
be put into a different order. One day I suppose I should go through
and correct those where the sequence of items is significant.


If the order is significant, e.g. in instructions that need to be followed
step by step, it's best to use <ol> - for much the same reasons as we make
a list numbered in text processing.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Oct 12 '05 #13
JRS: In article <Xn*****************************@193.229.0.31>, dated
Wed, 12 Oct 2005 19:34:34, seen in news:comp.infosystems.www.authoring.s
tylesheets, Jukka K. Korpela <jk******@cs.tut.fi> posted :

If the order is significant, e.g. in instructions that need to be followed
step by step, it's best to use <ol> - for much the same reasons as we make
a list numbered in text processing.


Perhaps not, since AIUI there's no way to access the numbers elsewhere
in the text.

So it's too easy to write, for example, "Be sure to do Step 3 outdoors"
and then forget to update it on adding a new list entry before Step 3.
If the numbers are actually written in the HTML, the error is somewhat
less likely to occur.

Some form of internal cross-referencing, apart from links, would be
useful; IIRC, I used it in a word processor decades ago.

One can probably do it with the help of javascript.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Oct 13 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Peter Schlenker | last post: by
1 post views Thread by David Bradbury | last post: by
8 posts views Thread by Udo Marx | last post: by
27 posts views Thread by The Bicycling Guitarist | last post: by
22 posts views Thread by stevenkobes | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.