473,480 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Styling List Items

Hi...

Is there any way to style a List Item a different color and size than
the <LI> in an Ordered List?

I'd like a red super-script number and a dark blue text in a page's
footnotes. And this be done using style sheets?

--
- Yours truly, Pete Collinson
Jul 20 '05 #1
5 6810
"Peter Collinson" <bl******@optonline.net> wrote:
Is there any way to style a List Item a different color and size than
the <LI> in an Ordered List?
The question does not parse. Do you mean to ask whether there is a way to
style a list item except by styling a list item? (Of course, you can style
list items in an unordered list, too.)
I'd like a red super-script number and a dark blue text in a page's
footnotes. And this be done using style sheets?


How does this relate to the above? It should relate, since the Subject
line mentions styling list items only.

Using red color for text is almost always a mistake, unless it's a warning
of some kind. Using dark blue for something that isn't a link is usually a
mistake, too.

But what is it that you are really trying to accomplish? I don't think we
can see that unless you post a URL of the current design. Specifically,
what do you mean by "footnotes"?

For some ideas on how to "map" footnotes of print design to something that
works on the Web, see http://www.cs.tut.fi/~jkorpela/www/fn.html

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #2
Jukka Korpela <jk******@cs.tut.fi> wrote:
Is there any way to style a List Item a different color
and size than the <LI> in an Ordered List?
The question does not parse. Do you mean to ask whether
there is a way to style a list item except by styling a list item?
(Of course, you can style list items in an unordered list, too.)
How 'bout this... I would like to make the number in an ol list a link a
separate color from the List Item.
I'd like a red super-script number and a dark blue text in
a page's footnotes. And this be done using style sheets?

How does this relate to the above? It should relate,
since the Subject line mentions styling list items only.
Could we please get past that? If I used improper nomenclature, I
apologize.
Using red color for text is almost always a mistake...
I do not wish to use red for the text. I wish to use dark blue (#084570)
for the text.
...unless it's a warning of some kind. Using dark blue
for something that isn't a link is usually a mistake, too.
I'll take that under advisement.
But what is it that you are really trying to accomplish?
I don't think we can see that unless you post a URL of
the current design. Specifically, what do you mean by
"footnotes"?


Exactly what you mean by "Footnotes" or "Endnotes" in your referenced
page.

1. Greeking greeking greeking greeking
greeking greeking greeking greeking.

The number and period ("1.") should be red superscript. The text should
be in dark blue. I can get everything but the Number, but can fake the
effect with a nested DIV styled as a hanging indent.

Div.nb {
text-indent: -2.0em;
padding-left: 2.5em;
}

Rather than number "manually," I'd prefer to do it as an Ordered List.

--
- Yours truly, Pete Collinson
Jul 20 '05 #3
In article <xK***********************@news4.srv.hcvlny.cv.net >, Peter
Collinson wrote:
Exactly what you mean by "Footnotes" or "Endnotes" in your referenced
page.
I believe footnotes are those that in book on same page, and endnotes
ones that are in the end. But I haven't even yet read the article, so I
could be wrong. (will read it later, it'll be useful)
1. Greeking greeking greeking greeking
greeking greeking greeking greeking.

The number and period ("1.") should be red superscript. The text should
be in dark blue.
I don't comment colors, that was already done.
Rather than number "manually," I'd prefer to do it as an Ordered List.


I suppose you mean not numbering it by hand?

I think you have at least 2 choises:
1. Position contents of list relatively, so figure seems superscript, and
make font-size smaller using small font for list and normal on links.
http://www.student.oulu.fi/~laurirai...footnotes.html

2. Use generated content. (only works Opera 5+)
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #4
"Peter Collinson" <bl******@optonline.net> wrote:
How 'bout this... I would like to make the number in an ol list a link a
separate color from the List Item.
It still doesn't quite parse. I mean the "to make [something] a link
a separate color". To make something a link, you use HTML markup, not CSS.
If I used improper nomenclature, I apologize.
Apology accepted, but this doesn't solve the problem that your problem
hasn't been adequately described. A URL would at least have shown the
markup you use.
1. Greeking greeking greeking greeking
greeking greeking greeking greeking.
I suppose this refers to an <ol> element at the end of your page.
The number and period ("1.") should be red superscript.
That doesn't sound like a good idea. In an endnotes section, there is no
reason to make the numbers superscripts. In footnote or endnote
_references_, superscripting has the purpose of making them less
noticeable, less disturbing for normal reading of the text. But this
reason is lost when we turn to the footnotes or endnotes themselves.

Anyway, technically, they could be affected by using the marker-related
features of CSS 2, but these are poorly supported.
I can get everything but the Number, but can fake the
effect with a nested DIV styled as a hanging indent.

Div.nb {
text-indent: -2.0em;
padding-left: 2.5em;
}
How does this affect the vertical position or color of the number?
It's not faking - instead, it's a simple (and not uncommon) solution to
the problem of getting hanging indents, but that's a completely different
problem.

To make it possible to style the endnote numbers in the endnotes
themselves, the only way that works reasonably is to use extra markup. For
example, make the list <ul>, with list-style-type: none in CSS, and use
markup like
<li><a name="fn1" href="#fr1" class="fnn">1.</a> text of list item</li>
which implies that you can use .fnn as a selector when specifying the
style of the numbers. Here the name and href attributes are not relevant
to that styling but useful for the functionality (making the entry a link
destination and a link back to the reference).
Rather than number "manually," I'd prefer to do it as an Ordered List.


But you need to number the endnote _references_ "manually" anyway - unless
you rely on generated content and counters, which would have little
browser coverage and isn't a good idea even in principle, since it would
fail in non-CSS browsing situations
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #5
Peter Collinson wrote:
Jukka Korpela <jk******@cs.tut.fi> wrote:
Is there any way to style a List Item a different color
and size than the <LI> in an Ordered List?

The question does not parse. Do you mean to ask whether
there is a way to style a list item except by styling a list item?
(Of course, you can style list items in an unordered list, too.)


How 'bout this... I would like to make the number in an ol list a
link a separate color from the List Item.


I think you are confused about the names, or I just don't understand
what you mean; in HTML you got:
"Unordered lists (UL), ordered lists (OL), and list items (LI)"
http://www.w3.org/TR/html401/struct/lists.html#h-10.2

To differentiate a link within a list item of an unordered list from
one of an ordered list, use following CSS:

ol li a { bla; }
ul li a { bla; bla; }

Or do you want to make a link out of the number of an <ol>?

--
Google Blogoscoped
http://blog.outer-court.com
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
731
by: Ray | last post by:
Hi Groups To achieve the visual effect of the page http://www.freewebs.com/nsl/test1.html but remove the table and use CSS, I wrote a page like this http://www.freewebs.com/nsl/test2.html I...
5
2574
by: John Topley | last post by:
Hi, I'm doing some work in an intranet environment where I'm forced to use IE 6.0. Is it possible to style (unordered) nested lists so that the inner list items have a different appearance to...
0
3210
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
10
1985
by: matt_randle | last post by:
Hi, I have a problem styling a definition list. If you look at http://68.178.211.60/MattRandle/Guides/Plants/MarginalsNZ.htm you will see the effect I am trying to achieve. If, however,...
6
2266
by: ashkaan57 | last post by:
Hi, How can I set up the styling for different levels of <ULto use different images for bullets, be indenetd differently, ... Like: .. list 1 - item 1 - item 2 .. list 2
2
1700
by: vkfmj | last post by:
I am bidding on a project that was coded completely in php with basic tables containing the data. My job is to make the site look pretty. I am a designer and I can *read* the php, but am not the...
3
4193
by: Momomo | last post by:
Hi, I am having a problem with a control which is caused by a style on the page which I am not able to trace. If I use the control in a page without any styling it looks ok. Is there a way to...
3
1728
by: shapper | last post by:
Hello, I am creating a simple navigation bar using a list. My anchor tags inside each list item have a background and margin. The problem is they are overlapping. I then added to the li tag...
2
2440
by: shapper | last post by:
Hello, I am styling the labels on a section of my page as follows: label {float: left; width: 6.5em;} Now I want to remove this styling from a label that has the class "Message". Mu...
0
6904
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...
1
6732
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6886
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5324
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,...
1
4768
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4472
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2990
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1294
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
174
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.