CSS Reference

"list-style" - css property (v. css 1)

  • This property is a shorthand notation for setting the three properties 'list-style-type' , 'list-style-image' , and 'list-style-position' at the same place in the style sheet.
  • Initial value: see individual properties
  • The property is inherited
  • HTML usage: elements with 'display: list-item'
  • Browsers that support the list-style - property :
    Internet Explorer Mozilla Firefox Opera Google Chrome Apple Safari

Property "list-style" example:

<!DOCTYPE HTML >
<html>
  <head>
    <style   type="text/css">
      div {width: 300px;}
      .o1 {
        list-style-type: upper-roman;
      }
      .u1 {
        list-style-image: url(images/Marker.png);
        list-style-position: inside;
      }
    </style>
  </head>
  <body >
    <div>
      Possible list-style properties
      <ol class="o1">
        <li>list-style-images</li>
        <li>list-style-position</li>
        <li>list-style-type</li>
        <li>list-style
          <ul class="u1">
            <li>Shorthand notation for setting
              all the three previous properties.
              (list-style-position: inside)</li>
          </ul>
        </li>
      </ol>
    </div>
  </body>
</html>

Javascript access:

// To SET values ([o] is the target object)
[o].style.listStyle="list-style values"
// Browsers can not return any trustworthy value from this property.
// To GET values, look at the details for each list-style.
© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.