Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    31
    Thanks
    1
    Thanked 0 Times in 0 Posts

    setting start value in OL using css

    We can set the start value for lists using HTML as shown below.

    Eg here the list starts with value like:
    10. Start from 10

    <OL start="10">
    <LI> Start from 10
    </OL>

    Is there a way to set this 'start' value using CSS?

    Thanks
    Vijay Venaktaraman

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    I don't think so... at least, I spent days looking for a css replacement to "<li value="x">" with no luck...

  • #3
    New Coder
    Join Date
    Jan 2005
    Posts
    31
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Richard,

    Thanks for the information. Very weird, that we cannot set it using CSS. I have live with HTML Tweaks.

    Thanks,
    Vijay Venkataraman

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If the numbering is important to the meaning of the list, and wide browser support is important - I'd use a <ul>, style away the bullet and then write in the numbers manually - because you can't know with complete certainty how <ol> numbering will actually come out.

    Alternatively - if you're in a mood to experiment (if it only has to work in mozilla / opera), you can do some very funky stuff with generated content and automatic counters
    Last edited by brothercake; 02-07-2005 at 05:47 PM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    This doesn't seem to validate even though it's in the spec
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    	<head>
    		<title>51699</title>
    	</head>
    	<body>
    		<ol>
    			<li value="10">Item 1</li>
    			<li>Item 2</li>
    			<li>Item 3</li>
    		</ol>
    	</body>
    </html>

  • #6
    New Coder
    Join Date
    Jan 2005
    Posts
    31
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Brothercake - Thanks for the links. They are really worth investigating
    hemebond - what you have pointed to is HTML controlled and not CSS controlled. Thanks for taking time to explain.

    Thanks once againg to everyone.

    Vijay Venkataraman

  • #7
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There has just been a good discussion on this on the WSG mailing list

    Here's the archive of that thread: http://www.mail-archive.com/wsg%40we.../msg14074.html

    I take no responsibility for the above nonsense.


    Left Justified

  • #8
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Great link, thanks Andrew...

    Personally, I'm siding with the guys who say don't worry about the specs on this one. I can think of several reasons to break up the start value or the list value of an ordered list, and as far as I'm concerned, it's a matter of content, not presentation.

    If the only out of spec part of your code is a warning from the validator about <ol start="">, then it seems you (the royal you, not you specifically, Vijay ) are coding just to satisfy the inner webnerd and not for real life advantages or needs. In other words, the letter and not the spirit of standards.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •