468,241 Members | 1,418 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,241 developers. It's quick & easy.

[css] move listitems closer to the bullets

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
1 3735
"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.

Similar topics

9 posts views Thread by Pierre Jelenc | last post: by
145 posts views Thread by Mark Johnson | last post: by
5 posts views Thread by Laphan | last post: by
12 posts views Thread by Mikejacko86 | last post: by
6 posts views Thread by Jean Pion | last post: by
reply views Thread by damiensawyer | last post: by
3 posts views Thread by Zhang Weiwu | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.