Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Search Search
Search for:
Tech Support Guy > > >

Difficulty using Ordered Lists in HTML tables


(!)

BarryLight's Avatar
BarryLight BarryLight is offline
Computer Specs
Junior Member with 1 posts.
THREAD STARTER
 
Join Date: Feb 2010
Experience: Intermediate
22-Feb-2010, 08:26 PM #1
Difficulty using Ordered Lists in HTML tables
Difficulty using Ordered Lists in HTML tables
I can't figure out how to use Ordred Lists inside HTML tables.
1. Decimal type
2. Tea
3. Coca Cola
The is an Ordered List, as it appears outside a table. (This is perfect, i.e., exactly what I want, when the list is outside of a table.)


I can't figure out a way to keep the Ordered List numbering working (as shown above) when the Ordered List appears inside a table. I need the numbering to continue from the Left cell in the first row (in the table below) to the Left cell in the second row (in the table below).

[I managed to screw up this page, so that now the table doesn't appear on the page anymore.]


  1. Decimal type
Right Column
  1. Tea
    <-- I wish that that the "1" could be replaced with a "2"
Right Column
  1. Coca Cola
    <-- I wish that that the "1" could be replaced with a "3"
Right Column

  1. First One
<-- I wish that that were a "2"
<-- I wish that that were a "3"
Whoops. One too many


<html>
<head>
<title>My HTML application</title>
<HTA:APPLICATION
APPLICATIONNAME="My HTML application"
ID="MyHTMLapplication"
VERSION="1.0"/>
</style>
</head>

<script language="VBScript">
</script>

<font size ="4"><b><u>My Outline-Numbering Wish List</b></u></font>
<br>

<ol>
<font color="blue"><li>Decimal type</li></font>
<font color="red"><li>Tea</li></font>
<font color="green"><li>Coca Cola</li></font>
</ol>
<br><br>

<table cellspacing=1 cellpadding=3 bgcolor="black">
<tr>
<td bgcolor="white">
<font color="blue"><ol><li>Decimal type</li></font>
</td>
<td bgcolor="white">
Right Column
</td>
</tr></ol>


<td bgcolor="white">
<font color="red"><ol><li>Tea<br><-- I wish that that the "1" could be replaced with a "2"</li></font>
</td>
<td bgcolor="white">
Right Column
</td>
</tr></ol>


<td bgcolor="white">
<font color="green"><ol><li>Coca Cola<br><-- I wish that that the "1" could be replaced with a "3"</li></font>
</td>
<td bgcolor="white">
Right Column
</td>
</tr></ol>
</table>
<br>


<table cellspacing=1 cellpadding=3 bgcolor="black">
<tr>
<td bgcolor="white">
<ol>
<font color="blue"><li>First One</li></font>
</td>
<td bgcolor="white">
<font color="red"><li><-- I wish that that were a "2"</li></font>
</td>
</tr>


<tr>
<td bgcolor="white">
<font color="green"><li><-- I wish that that were a "3"</li>
</td>
<td bgcolor="white">
<li>Whoops. One too many</li>
</td>
</tr>

</table></ol>


</body>
</html>

Last edited by BarryLight; 22-Feb-2010 at 09:03 PM.. Reason: the numbering changes after I save it.
tomdkat's Avatar
Computer Specs
Trusted Advisor with 7,141 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
23-Feb-2010, 02:30 AM #2
You need specify the starting number for the first list item using the "value" attribute. You can read about the "value" attribute of the <li> element here.

Here is an example:
Code:
<table style="text-align: left; width: 75%; margin-left: auto; margin-right: auto;" border="1" cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td style="vertical-align: top;">
      <ol>
        <li>fe</li>
      </ol>
      </td>
    </tr>
    <tr>
      <td style="vertical-align: top;">
      <ol>
        <li value="2">fi</li>
      </ol>
      </td>

    </tr>
    <tr>
      <td style="vertical-align: top;">
      <ol>
        <li value="3">fo</li>
        <li>fum</li>
      </ol>
      </td>
    </tr>
  </tbody>
</table>
Peace...
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑