Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHTML OrderList question 1

Status
Not open for further replies.

bookworm55

Programmer
Nov 9, 2005
3
US
I am working in VB with the DHTML object. This is my first project using this object. I am suppose to set it up so the user can make a several level orderlist. It should look something like this

1. ------------------
2. ---------------
a. --------------
b. -----------
using:
DHTMLa.ExecCommand DECMD_ORDERLIST, OLECMDEXECOPT_DODEFAULT
I can get get paragraph to start with a number, but I can't get them to start with a captial letter, small letter, or roman numberal. Can anyone tell me what change I need to make so this will work. Any help would be very appreciated. Thanks
 
but I can't get them to start with a captial letter, small letter, or roman numeral
You need to either get HTML out with the type attribute set:
Code:
<ol type="A">
  <li>Upper</li>
</ol>
<ol type="a">
  <li>Lower</li>
</ol>
<ol type="I">
  <li>Roman</li>
</ol>
or you need to set a class attribute...
Code:
<ol type="upper">
  <li>Upper</li>
</ol>
<ol type="lower">
  <li>Lower</li>
</ol>
<ol type="roman">
  <li>Roman</li>
</ol>
... that you can then style in a CSS stylesheet:
Code:
ol.upper { list-style: upper-alpha; }
ol.lower { list-style: lower-alpha; }
ol.roman { list-style: upper-roman; }
(though you should use more meaningful names for the class, that reflect what the list contains rather than it's styling)

If you just want lists-within-lists always to be lettered instead of numbered, you can do that with no extra markup and just a little CSS:
Code:
ol ol { list-style: lower-alpha; }

How you'd do any of the above in VB is probably a question for the VB forum.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top