Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6155613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:27:54+00:00 2026-05-23T20:27:54+00:00

I have a couple un-ordered lists on my page. Both lists use list-style: disc

  • 0

I have a couple un-ordered lists on my page. Both lists use list-style: disc inside;. Each list’s list-items have a couple div‘s inside them. The problem is that the list-item’s content takes up multiple lines and the disc is appearing vertically, at the bottom of the multi-line list-item.

Here is a screenshot kind of showing the problem I am experiencing. Note that I stole the image from a similar question, it is not my HTML or CSS.

Here is a striped down version of my HTML:

<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="billing_form">
<div id="purchase_items">
    <h2>Your purchase</h2>
    <h4>Items:</h4>
    <div class="items">
        <ul>
            <li>
                <div class="item">First Product - one year license</div>
                <div class="price">$99.00 USD</div>
            </li>
            <li>
                <div class="item">Second product & 3 year Product Plan</div>
                <div class="price">$125.00 USD</div>
            </li>
        </ul>
    </div>
    <div class="subtotal">SUBTOTAL: $224.00 USD</div>
    <h4>Discounts:</h4>
    <div class="discount">
        <ul>
            <li>
                <div class="item">A really long discount item name - with extra info on three lines!</div>
                <div class="price">- $20.00 USD</div>
            </li>
        </ul>
    </div>
    <div class="total">TOTAL: $204.00 USD</div>
</div>
</div>

</body>
</html>

And here is the CSS, as small as I thought was relevant:

html
{
    font-family: sans-serif;
}

#billing_form
{
    width: 350px;
    margin: 0 auto;
    font-size: 14px;
    background-color: #EEEEEE;
}

#billing_form .items
{
    position:relative;
}

#billing_form .discount
{
    position:relative;
    color:#3665B0;
}

#billing_form ul
{
    margin: 0;
    padding: 0;
    list-style: disc inside;
}

#billing_form .items .item, 
#billing_form .discount .item
{
    display: inline-block;
    width: 190px;
}

#billing_form .price
{
    float: right;
    padding-left: 20px;
}

#billing_form .items,
#billing_form .discount,
#billing_form .subtotal,
#billing_form .total
{
    width: 100%;
}

#billing_form .subtotal,
#billing_form .total
{
    text-align: right;
    margin-top: 5px;
    border-top: 1px solid;
    font-weight: bold;
}

#billing_form  #purchase_items
{
    margin: 10px 10px 10px;
}

I found a similar SO question. Unfortunately, the accepted (and only) answer to it states to try position: relative; and vertical-align: top; but it didn’t work for me. I tried it with both #billing_form ul and #billing_form ul li and neither worked. They also mention a IE7 hack fix, but I don’t think that is relevant to me because I am experiencing the problem in Firefox 3 & 4 and Google Chrome.

Does anyone know how I can make the list-item bullets (discs) appear at the top of each line item?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:27:54+00:00Added an answer on May 23, 2026 at 8:27 pm

    It looks like vertical-align: text-top; will do what you want (see spec). I believe the reason is that you are creating tall inline blocks that are aligning to the top of the box which is being pushed up by the tall inline box so aligning to top doesn’t do what you want. However, I believe that using text-top will align it with the top of where the text is (and the bullet point).

    http://jsfiddle.net/Yayuj/ is a fiddle that does what you want (I believe) and has primarily this updated section from your CSS:

    #billing_form .discount .item
    {
        display: inline-block;
        width: 190px;
        vertical-align: text-top;
    }
    

    Any other differences to what you have pasted above should be cosmetic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://jsfiddle.net/jasondavis/Mt87G/1/ I am trying to do an un-ordered list, each list item will have
ok I have couple of .NET classes that I want to use in VBA.
I have a script I'm using to rotate images in an un-ordered list (LI).
I currently have a solution with a couple of projects and one of them
I have couple of forms on my php page. I am using jQuery (&
I have couple of inline images within a div I can't get the div
I have couple of tables, where I cannot use hibernate mappings to define associations
I use Outlook 2007, and I have ordered my mails so that the most
I hi have just ordered a couple of beaglboards for experimenting. I know that
I've got a single OnDownloadProgress event handler for an ordered list of BitmapImage items

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.