Go Back   Trackpads Community > General Discussions > Computer and Technology > Web Design

Web Design Forums and discussions on webdesign

Web Design

Reply
 
LinkBack Thread Tools
Old 05-31-2005, 12:00   #1 (permalink)
Dylan Parry
Civilians

 
Default Splitting an ordered list

Hi folks,

Does anyone know how to split an ordered list in a cross-browser, specs
complying way? eg.

1. Item 1
2. Item 2
3. Item 3

Some Paragraph text...

4. Item 4
5. Item 5

I know that I can do it with some deprecated markup, but if there is
another way I would like to use it!

Cheers,

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and reference
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Old 05-31-2005, 12:00   #2 (permalink)
Els
Civilians

 
Default Re: Splitting an ordered list

Dylan Parry wrote:

> Hi folks,
>
> Does anyone know how to split an ordered list in a cross-browser, specs
> complying way? eg.
>
> 1. Item 1
> 2. Item 2
> 3. Item 3
>
> Some Paragraph text...
>
> 4. Item 4
> 5. Item 5
>
> I know that I can do it with some deprecated markup, but if there is
> another way I would like to use it!


Only if you don't mind if the paragraph is really part of the 3rd
item:

<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3
<div>
<p>
some paragraph text, marked up as paragraph
</p>
</div>
</li>
<li>Item 4</li>
<li>Item 5</li>
</ol>

It's valid strict HTML, and works in Firefox and IE6 - haven't tried
the rest, but I don't see why it wouldn't work in other browsers.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-31-2005, 12:00   #3 (permalink)
GreyWyvern
Civilians

 
Default Re: Splitting an ordered list

And lo, Dylan Parry didst speak in alt.www.webmaster:

> Hi folks,
>
> Does anyone know how to split an ordered list in a cross-browser, specs
> complying way? eg.
>
> 1. Item 1
> 2. Item 2
> 3. Item 3
>
> Some Paragraph text...
>
> 4. Item 4
> 5. Item 5
>
> I know that I can do it with some deprecated markup, but if there is
> another way I would like to use it!


There is the "start" attribute which, as you say, is deprecated. It's
replacement is the CSS counter-reset and counter-increment properties,
which is not supported by MSIE. I'm afraid it's either one or the other
in this case.

My small personal campaign is to continue using the "start" attribute,
even in otherwise fully validating XHTML documents. I do this because I
believe the deprecation of this attribute was a mistake. The number
corresponding to each item in an ordered list (and nested ordered list) is
often an important part of the *meaning* of a document, and not it's
"style".

Oh, eventually I'll have to move away from it; but as long as it's
supported by all browsers yet, I'll still be using it.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- http://www.greywyvern.com/ringmaker - Orca Ringmaker: Host a web ring
from your website!
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-31-2005, 16:00   #4 (permalink)
Norman L. DeForest
Civilians

 
Default Re: Splitting an ordered list


On Tue, 31 May 2005, Dylan Parry wrote:

> Hi folks,
>
> Does anyone know how to split an ordered list in a cross-browser, specs
> complying way? eg.
>
> 1. Item 1
> 2. Item 2
> 3. Item 3
>
> Some Paragraph text...
>
> 4. Item 4
> 5. Item 5
>
> I know that I can do it with some deprecated markup, but if there is
> another way I would like to use it!
>
> Cheers,


Would it matter if newer browsers displayed it as this:

: 1. Item 1
: 2. Item 2
: 3. Item 3
:
: Some Paragraph text...
:
: 4. Item 4
: 5. Item 5

and older browsers displayed it as this: ??

: 1. Item 1
: 2. Item 2
: 3. Item 3
: 4. Item 4
: 5. Item 5
:
: Some Paragraph text...

With Firefox, I got something similar to the effect that you want by using
positioning (which older browsers don't support):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>List test</title></head><body>

<ol>
<div style="position: absolute; top: 10">
<li>first item</li>
<li>second item</li>
<li>third item</li>
</div>
<div style="position: absolute; top: 200">
<li>fourth item</li>
<li>fifth item</li>
<li>sixth item</li>
</div>
</ol>

<p style="position: absolute; top: 100">A paragraph of text that is not
really part of the list but that needs to be displayed in the middle of
the list.</p>

</body></html>


Of course, that has its own problems including an inability to adjust for
font size.

--
Can you Change: N O V A Halifax to N O V A Halifax
S C O T I A . S C O T I A .
in 34 moves? Try http://www.chebucto.ns.ca/~af380/JSNSPuz.html
(Requires Firefox or a browser with a compatable version of JavaScript)

 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-31-2005, 16:00   #5 (permalink)
Toby Inkster
Civilians

 
Default Re: Splitting an ordered list

GreyWyvern wrote:

> My small personal campaign is to continue using the "start" attribute,
> even in otherwise fully validating XHTML documents. I do this because I
> believe the deprecation of this attribute was a mistake.


Agreed.

Some options are:

1. Use the "start" attibute anyway and forget about validation;
2. Create your own DTD that includes "start";

Option 2 isn't difficult really. It's dead easy to add and remove elements
and attributes to the HTML 4.0(1) and XHTML 1.0 DTDs. XHTML 1.1's DTD is
somewhat more convoluted, but there is a "legacy" module which can be
enabled with a simple one-line edit -- it includes the "start" attribute.

In some larger projects I occasionally find the need for things like
<NOBR> and <U> so end up writing my own DTD.

3. Switch to XHTML 2.0 -- OK, maybe this is a little premature,
but although "start" is still gone, the latest draft of XHTML 2.0
brings back the "value" attribute on LI elements.

--
Toby A Inkster, who just used "text/plain" and doesn't have to worry
about this.
Contact Me ~ http://tobyinkster.co.uk/contact
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-31-2005, 20:00   #6 (permalink)
GreyWyvern
Civilians

 
Default Re: Splitting an ordered list

And lo, Charles Sweeney didst speak in alt.www.webmaster:

> GreyWyvern wrote
>
>> My small personal campaign is to continue using the "start" attribute,
>> even in otherwise fully validating XHTML documents. I do this
>> because I believe the deprecation of this attribute was a mistake.

>
> Surely not! You mean they're not always right!


I never said they were. But, like the UN, we support them and hope they
make the right decisions, because they're the only thing standing between
us and rampant entropy.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- http://www.greywyvern.com/ringmaker - Orca Ringmaker: Host a web ring
from your website!
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 05-31-2005, 20:00   #7 (permalink)
Charles Sweeney
Civilians

 
Default Re: Splitting an ordered list

GreyWyvern wrote

> And lo, Charles Sweeney didst speak in alt.www.webmaster:
>
>> GreyWyvern wrote
>>
>>> My small personal campaign is to continue using the "start"
>>> attribute,
>>> even in otherwise fully validating XHTML documents. I do this
>>> because I believe the deprecation of this attribute was a mistake.

>>
>> Surely not! You mean they're not always right!

>
> I never said they were. But, like the UN, we support them and hope
> they make the right decisions, because they're the only thing
> standing between us and rampant entropy.


)

--
Charles Sweeney
http://CharlesSweeney.com
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help: splitting... dervishme@comcast.net Microsoft Applications 4 06-07-2005 00:00
Re: Splitting tasks Gérard Ducouret Microsoft Applications 2 04-07-2005 12:00
Splitting dates Mike Microsoft Applications 1 02-20-2005 20:00
Splitting a Cell Roast Microsoft Applications 2 12-16-2004 16:00
Splitting First and Last Names Jamie Microsoft Applications 2 11-15-2004 16:00


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 12:51.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.98621 seconds with 19 queries