[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Ordered list with underline and parenthesis

Asked by BjornEM in Cascading Style Sheets (CSS), Hypertext Markup Language (HTML)

Tags: CSS, ordered list, text-decoration

I am looking for a way to use CSS to create two types of ordered lists. One of the lists should have the number underlined, and the other list should surround the number with parenthesis such as (a), (b), (c).

For the underline list I have tried text-decoration: underline and it works, but the problem is that it underlines all the text in the list item. I have tried to prevent this by surrounding the text in the list item with <span id="Ordinary">some text</span> where Ordinary sets text-decoration to none but it does not work. As you can see I have also tried using a specialised p.class.

I can add any text attribute, such as overline or set text color to red but I can't seem to override (subtract) settings made higher up. Is it possible to create a list where the numbering is underlined, but the rest of the text normal?

With regards to the other list, using parenthesis, I have found a code snippet that will accomplish something close to what I want, but it doesn't seem to work in IE7 which is annoying since IE7 is a requirement. Is there any other way, a work around, for IE?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
<html>
	<head>
		<title>Enter the title of your XHTML document here</title>
		<style type="text/css">
			ol.withroman {list-style-type:lower-roman}
			ol.withunderscore {list-style-type:lower-alpha; text-decoration: underline}
			
			ol.parenthesis li {list-style-type: none;}
			ol.parenthesis li:before {display: marker;content: counter(counter) ") ";counter-increment: counter;counter-reset: none;width: 2em;float: left;}
			ol.parenthesis {counter-reset: counter;}
			
			p.red {text-decoration: none; color: red}
			
			#Ordinary {text-decoration: none; font-size:50%}
		</style>
	</head>
	<body>
		<ol class="withroman">
			<li>Step one</li>
			<li>Step two</li>
		</ol>
 
		<ol class="withunderscore">
			<li>Step one</li>
			<li><span id="Ordinary">Step two</span></li>
			<li><p class="red">Step three</p></li>
		</ol>
 
		<ol class="parenthesis">
			<li>Step one</li>
			<li>Step two</li>
		</ol>
 
	</body>
</html>
Attachments:
 
The result in IE7
The result in IE7
 
 
The result in Firefox 3
The result in Firefox 3
 
[+][-]08/02/09 03:44 PM, ID: 25000941Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Cascading Style Sheets (CSS), Hypertext Markup Language (HTML)
Tags: CSS, ordered list, text-decoration
Sign Up Now!
Solution Provided By: JulesWebb
Participating Experts: 1
Solution Grade: A
 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625