?
Solved

CSS list increment start at different number

Posted on 2010-01-11
6
Medium Priority
?
331 Views
Last Modified: 2012-05-08
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
Comment
Question by:Victor Kimura
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 11

Expert Comment

by:rajvja
ID: 26282199
See this link

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

<OL start="3">
  <LI>...</LI>
</OL>
0
 
LVL 40

Assisted Solution

by:Gurvinder Pal Singh
Gurvinder Pal Singh earned 600 total points
ID: 26282287
0
 
LVL 9

Expert Comment

by:darkapple
ID: 26282537
you can add type too.

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

Open in new window

0
 
LVL 6

Accepted Solution

by:
Tony O'Byrne earned 1400 total points
ID: 26293052
@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
 

Author Closing Comment

by:Victor Kimura
ID: 31675444
Thank you.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question