Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Decrease distance between numbers and items

Posted on 2008-06-25
2
Medium Priority
?
321 Views
Last Modified: 2008-08-31
I want there to be less space between the numbers and my text in an ordered list.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Home</title>
<style type="text/css">
 
body {
font-size: 11px;
font-family: arial, helvetica, san-serif;
}
 
 
#contentRight {
  display: block; 
  margin-top: 15px;
  padding: 0px;
  width: 200px; 
border: 1px solid blue;
}
 
#contentRight div {
  margin: 0px 0px 20px 0px;
  width: 100%;
}
 
ol {
  padding: 10px 0 0 0;
  margin: 0 0 0 19px;
  border: 1px solid green;
}
 
 
li {
  padding: 0 0 0 0px;
  margin: 0 0 0 0px;
  border: 1px solid red;
}
</style>
</head>
<body>
 
<div id="contentRight">
 
<h2>Hello World</h2>
 
<ol
><li>fads ads kadsh kdah dsak fhadsk dsfjk dashk adsh kjahds jkhdskjhdaskj hkadsj hkja ds adsf </li
><li>jg asdf adsf dsaf das fads fdsaf dasf ad dsfdas fads ads ads fdas ads jh gjh</li
><li>adsf dads dsf das j dasfgdsjaf ds fhdgs fdas jh</li
><li>dqr ds das jfdas gdsa fjdsah dasg fdas jh</li
><li>fdas ads das das dsa das dsfdsa fsda fdas fads fjasdf gdasf dajsf asdh dsag asd df das jh</li
><li>jgjasdfa ds hgjh</li
><li>dasf das jgjhasdf das ads d dsa ds f gjh</li
><li>fdsa ads das  fds dsfa fjgjhgjh</li
></ol>
 
</div>
 
</body>
</html>

Open in new window

0
Comment
Question by:hankknight
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 21868874
Hank: Amazingly, I can't figure it out!
http://archivist.incutio.com/viewlist/css-discuss/85081

What a great question. The OL number appears to be a part of the element.  I'll tinker some more. ~Ray
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 21868985
This would seem to have some value to the issue, but in practice in FF it does not.  It changes alignment of the list style
http://www.blooberry.com/indexdot/css/properties/list/lsposition.htm

But try this in the code snippet:
li {
  text-indent: -0.5em;
  padding: 0 0 0 0px;
  margin: 0 0 0 0px;
  border: 1px solid red;
}

Open in new window

0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question