HTML/CSS/List Style/list style position

Материал из Web эксперт
Перейти к: навигация, поиск

LI list-style-position: inside;

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
li {
 list-style-position: inside;
 width: 33%;
 padding: 0;
 margin: 0;
}
ul {
 margin: 0;
 padding: 0 0 0 1em;
}
</style>
</head>
<body>
  <h3>
   Table of Contents
  </h3>
  <p>
   As proposed, the contents of the paper will contain the following sections:
  </p>
  <ul>
   <li>Database</li>
   <li>Privacy</li>
   <li>Best</li>
   <li>Automation?</li>
   <li class="last">Smart Choice</li>
  </ul>
  <p>
   let <a href="n@h.ru">Nicholas</a> know about it.
  </p>
  
  
</body>
</html>



list-style-position: outside

 

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
  <title>CSS Example</title>
  <style rel="stylesheet" type="text/css">
body {
  background-color: #ffffff;
}
ul {
  list-style-position: outside;
}
ol {
  list-style-position: inside;
}
</style>
</head>
<body>
<ul>
  <li>This example illustrates how text looks when it wraps onto the next line, and uses the list-style-position property. You should see the text wrap onto the next line, and this property indicates where the new line begins.</li>
  <li>This example illustrates how text looks when it wraps onto the next line, and uses the list-style-position property. You should see the text wrap onto the next line, and this property indicates where the new line begins.</li>
  <li>This example illustrates how text looks when it wraps onto the next line, and uses the list-style-position property. You should see the text wrap onto the next line, and this property indicates where the new line begins.</li>
</ul>
<ol>
  <li>This example illustrates how text looks when it wraps onto the next line, and uses the list-style-position property. You should see the text wrap onto the next line, and this property indicates where the new line begins.</li>
  <li>This example illustrates how text looks when it wraps onto the next line, and uses the list-style-position property. You should see the text wrap onto the next line, and this property indicates where the new line begins.</li>
  <li>This example illustrates how text looks when it wraps onto the next line, and uses the list-style-position property. You should see the text wrap onto the next line, and this property indicates where the new line begins.</li>
</ol>
</body>
</html>