Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 334
  • Last Modified:

CSS list increment start at different number

HI,

I'm just wondering how I can start a <ol> at a different number.

If I have:

<ol>
<li>1</li>
<li>2</li>
</ol>

<p>a paragraph</p>

<ol>
<li>3</li>
<li>4</li>
</ol>

How can I get the second ol list to start at 3 rather than one. There is a deprecated start attribute but I don't wish to use the deprecated form.

Thank you,
vkimura
0
Victor Kimura
Asked:
Victor Kimura
2 Solutions
 
rajvjaCommented:
See this link

http://www.html-reference.com/OL.asp

<OL start="3">
  <LI>...</LI>
</OL>
0
 
darkappleCommented:
you can add type too.

<OL start="3" type="1">
  <LI>...</LI>
</OL>

Open in new window

0
 
Tony O'ByrneSenior Web DeveloperCommented:
@rajvja: start is deprecated.

vkimura2007:  Here's some sample code that I believe achieves the effect you're looking for...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<style type="text/css" media="all">
			p.inList{
				margin: 0px;
				margin-left: -25px;
				padding: 0px;
			}

		</style>
	</head>

	<body>
		<ol>
			<li>asd</li>
			<li>asd</li>
			<li>asd</li><br />
			<p class="inList">Test test test test test test</p>
			<li>asd</li>
			<li>asd</li>
		</ol>
	</body>
</html>

Open in new window

0
 
Victor KimuraSEO, Web DeveloperAuthor Commented:
Thank you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now