Solved

adding a hanging indent to a bullet list

Posted on 2004-04-06
5
3,761 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
[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
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 500 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

628 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