Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

adding a hanging indent to a bullet list

Posted on 2004-04-06
5
Medium Priority
?
3,764 Views
Last Modified: 2010-08-05
How could you add a hanging indent to a bullet list without adding extara leading space?
0
Comment
Question by:CABITSS
5 Comments
 
LVL 6

Expert Comment

by:dgelinas
ID: 10767024
<style>
#navcontainer ul li a
{
background: transparent url(../images/bulletNon.gif) left center no-repeat;
text-align: left;
text-indent: 5;  //Change this here to create more or less indent..  Can even use negative.
font: bold 9pt arial;
text-decoration: none;
}
</style>

<body>
<div id="navcontainer">
  <ul id="navlist">
    <li><a href="">Bullet One</a></li>
    <li><a href="">Bullet Two</a></li>
    <li><a href="">Bullet Three</a></li>
    <li><a href="">Bullet Four</a></li>
  </ul>
</body>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 10767034
one way is to use the blockquote tag:

<ul>
  <li><blockquote> your content 1 </blockquote></li>
  <li><blockquote> your content 2 </blockquote></li>
</ul>
0
 
LVL 4

Expert Comment

by:monolith_888
ID: 10767046
Do you mean something like this?

<table border=0 cellpadding=0 cellspacing=0 width="200">
  <tr valign=top>
    <td>&#149;&nbsp;</td>
    <td>Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 Item 1 </td>
  </tr>
  <tr valign=top>
    <td>&#149;&nbsp;</td>
    <td>Item 2 </td>
  </tr>
  <tr valign=top>
    <td>&#149;&nbsp;</td>
    <td>Item 3 </td>
  </tr>
</table>

-blake
0
 
LVL 31

Accepted Solution

by:
seanpowell earned 2000 total points
ID: 10770788
dgelinas has the right idea in using the indent.
One other thing to be careful with though is that the indent actually moves the bullets to the left, as opposed to the indent to the right - so if it's an issue, you need to counter that indent with the margin setting:

<html>
<head>
<style type="text/css">

.placeholder
{
width       : 170px;
padding     : 10px 10px 0 0;
border      : 3px solid gray;
}

ul.one li
{
margin-left : 10px;
text-indent : -10px;
}

ul.two li
{
text-indent : -10px;
}

</style>
</head>
<body>

<div class="placeholder">
  <ul>
    <li>This will wrap and have no indent</li>
  </ul>
</div>
<div class="placeholder">
  <ul class="one">
    <li>This will look like the first with an indent</li>
  </ul>
</div>
<div class="placeholder">
  <ul class="two">
    <li>This will move to the left and have an indent</li>
  </ul>
</div>

</body>
</html>
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
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.…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

885 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