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
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    display:list-item

    this code do not work

    -------------------------------------------------------------

    <?xml version="1.0" encoding="iso-8859-1"?>
    <!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <style type="text/css" >
    div
    {display:block;}
    span.L
    {display:list-item;list-item-type:disc;}
    </style>
    </head>
    <body>
    <div>
    <span class="L">A</span>
    <span class="L">B</span>
    <span class="L">C</span>
    </div>
    </body>
    </html>

    ---------------------------------------------------------

    I get a list but no disc

    do you know hy ?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Shouldn't that be: list-style-type:disc;?

    Also, Win/IE6 needs to see a DTD on the first line of your page. If it's not there, it renders your page in quirks mode. So better take out the xml declaration? It's not required anyways.

    And, by the way, a div is a block level element by default. You don't need the
    div {
    display:block;
    }

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    but

    with or without the result ís the same , it doesn't work

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Then it's probably not supported by IE yet..
    I only use none/block/inline for the display property. Support for anything else doesn't exist or is buggy.

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    others

    same thing for Mozilla and opera ....it doesn't work

  • #6
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    This works for me in Opera 7, and it should work in Opera 6 as well:

    Code:
    listItem {
    	display: list-item;
    	list-style: outside;
    }
    
    listItem:before {
    	display: marker;
    	content: counter(counter) ".)";
    	counter-increment: counter;
    	width: 2em;
    	vertical-align: middle;
    }
    I used this as my test document:

    Code:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/css" href="list.css"?>
    
    <docEl>
    	<masterList>
    		<listItem>Hello</listItem>
    		<listItem>World</listItem>
    	</masterList>
    </docEl>
    Mozilla supports content:, but it does not to my knowledge support counter(), though I do seem to remember seeing -moz-counter() before...

  • #7
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    html

    it works only for Opera

    even in that way

    <!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fen">
    <head>
    <style type="text/css" >
    listItem {
    display: list-item;
    list-style: outside;
    }

    listItem:before {
    display: marker;
    content: counter(counter) ".)";
    counter-increment: counter;
    width: 2em;
    vertical-align: middle;
    }

    </style>
    </head>
    <body>
    <docEl>
    <masterList>
    <listItem>Hello</listItem>
    <listItem>World</listItem>
    </masterList>
    </docEl>
    </body>
    </html>




    thank you

  • #8
    Regular Coder
    Join Date
    Jul 2002
    Posts
    128
    Thanks
    0
    Thanked 0 Times in 0 Posts

    too

    this too

    <!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fen">
    <head>
    <style type="text/css" >
    tag {
    display: list-item;
    list-style: outside;
    }

    tag:before {
    display: marker;
    content: counter(counter) ".)";
    counter-increment: counter;
    width: 2em;
    vertical-align: middle;
    }

    </style>
    </head>
    <body>
    <div>
    <div>
    <tag>Hello</tag>
    <tag>World</tag>
    </div>
    </div>
    </body>
    </html>

    it works


    ...only opera :-((


  •  

    Posting Permissions

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