473,396 Members | 1,836 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 49828


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Peter Schlenker | last post by:
In a navigation panel I try to place a bullet before each entry when the link is hovered at (see http://www.shambhala.de). Mozilla does it like expected, but IE doesn't - any ideas? <a...
1
by: David Bradbury | last post by:
I may be thinking about this the wrong way, but here goes: In my style sheet I've specified that bullet points should use a specific image rather than just be default bullet points. However, at...
8
by: Udo Marx | last post by:
Hello to ciwas! Is there a way to change the bullet form, color, etc, of the element <li> under<ul> via css? Any reply will be appreciated. -- Freundliche Gruesse, Netzteil - Udo Marx...
27
by: The Bicycling Guitarist | last post by:
Hi. I found the following when trying to learn if there is such a thing as a non-breaking hyphen. Apparently Unicode has a ‑ but that is not well-supported, especially in older browsers. Somebody...
22
by: stevenkobes | last post by:
If a word has a hyphen in it, IE will permit a line break at the hyphen, but Firefox/Mozilla won't. Apparently the Firefox behavior is standards-compliant, but it is not what I want. Is there a...
4
by: Rubin | last post by:
1) I want to show a breaking hyphen in Mozilla 1.5.0.4 How do I do that? "Unicode standard annex #14", <http://www.unicode.org/reports/tr14/>, defines 4 breaking hyphens. <quote> Breaking...
9
by: David | last post by:
Hi, I have a field in a select query: 'Metal-XS' which is causing a problem The recordset should look like: RS2("Metal-XS") but it says this does not exist, and I cannot get the SQL to work in...
6
by: Kc-Mass | last post by:
In a standard Ascii table a dash or hyphen is decimal 45. A period or dot is decimal 46. If I sort a table or recordset of mixed character string ascending in Access, those strings beginning with...
4
by: Peter | last post by:
Hi all, I am searching through directories trying to find the prefix to a number of files. Unfortunately the files don't have a standard naming convention yet. So some of them appear as:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.