Forum Moderators: not2easy

Message Too Old, No Replies

list bullet appears on second line of list-item text

         

jdcowan

3:31 am on Jan 29, 2008 (gmt 0)

10+ Year Member



I have a css style for my bulleted lists that appear in a main content section (div) on my pages. The problem I have is in IE 6 and 7. If the text on a bulleted item wraps to a second line, the bullet aligns with the second (lower) line. How can I get it to stay on the first (upper) line. I believe it is caused by my width: 550px; in the css for the li. When I remove that, the bullet behaves normally. However, I need to limit the width as these run out of my container div they are in.

Help?

My doctype is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

style:
#content {
clear: right;
float: right;
width: 76%;
padding-right: 2px;
}
#content li {
width: 550px;
line-height: 21px;
list-style: disc outside;
}

<div id="content">
<ul>
<li>Book Projects: Chronicle your company's heritage to educate new employees or celebrate an anniversary or major event</li>
<li>Executive Communications: Help your leaders communicate with clarity and confidence </li>
</ul>
</div>

When this page renders, the text "celebrate an anniversary..." appears on a second line and the bullet is to the left of 'celebrate' not on the first line next to 'Book ...'

Book Projects: Chronicle your company's heritage to educate new employees or
-- celebrate an anniversary or major event

On the second bullet, the bullet appears on the second line next to the word 'confidence' not on the first line next to 'Executive ...'

Executive Communications: Help your leaders communicate with clarity and
-- confidence

Any thoughts?
Much appreciated.

jdcowan

1:43 pm on Jan 29, 2008 (gmt 0)

10+ Year Member



Silly me... I realized that since my content width was a percentage, the content "could" stretch beyond that limit - or beyond the edge of the window making the user have to scroll.

I added another div tag on the page after my content div ant the bullets apear normal again.

<div id="content">
<div style="width: 600px; text-align: left;">
<ul>
<li> list item 1 </li>
<li> list item 2 </li>
</ul>
</div>
</div>

Cheers!