By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,787 Members | 1,124 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,787 IT Pros & Developers. It's quick & easy.

[css] move listitems closer to the bullets

P: n/a
Does anyone know how to change the distance between a list item and
the accompanying text???

example.

1.------item1
2.------item2

should be:

1.--item1
2.--item2

[- are spaces]

I need to use the [ol] and [li] tags.

I can set 'padding left' for the [li] tag, but only in positive values
which widense the distance,
I want to move the text and bullets closer to each other.

sample HTML (item1 needs moving):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
</head>
<body>

<ol>
<li style="padding-left: -10px;">item 1
<li style="padding-left: 0px;">item 2
<li style="padding-left: 10px;">item 2
</ol>

</body>
</html>
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"P Creyghton" <pc******@xs4all.nl> wrote in
comp.infosystems.www.authoring.stylesheets:
Does anyone know how to change the distance between a list item and
the accompanying text???


Some things work in one browser, some in another. See
http://devedge.netscape.com/viewsour...2/list-indent/
for a technique that works in all -- well, in all that support CSS.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.