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 7647385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:26:55+00:00 2026-05-31T10:26:55+00:00

When I have an unordered list formatted as inline-blocks, the last list element in

  • 0

When I have an unordered list formatted as inline-blocks, the last list element in the list appears to have extra top margin if the other elements have any block content. Take a look at this HTML:

<div id="report_builder">
    <ul id="report_layout_1" class="report_layout ui-droppable">
        <li rel="recid">Id
            <div><input type="text" class="report-column-value"></div>
        </li>
        <li rel="street1">Address
            <div><input type="text" class="report-column-value"></div>
        </li>
        <li>
            Last Field
        </li>
    </ul>
</div>​

Here is the CSS:

#report_builder li {
    font-size: 8pt;
}

#report_builder > ul {
    float: left;
}

.report_layout {
    height: 150px;
}
.report_layout > li {
    display: inline-block;
    padding: 5px;
    margin-left: 2px;
    border: 1px solid #ccc;
    border-top: 10px solid #ccc;
    height: 100px;
    background-color:#fff;
}
.report_layout > li:last {
    cursor: default;
}
.report_layout > li a {
    cursor: pointer;
}
.report_layout > li:nth-child(even) {
    background-color:#eee;
}

#report_builder input.report-column-value {
    width: 95px;
}

​
Why does that last list element drop down? Here is a fiddle to demo what I’m doing.

  • 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-31T10:26:56+00:00Added an answer on May 31, 2026 at 10:26 am

    It is weird, but you should force your list items to align to the top using vertical-align: top;. See working version on jsfiddle.

    That’s because inline-block elements will align as inline, i.e., siblings will use the baseline as the alignment reference.

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

Sidebar

Related Questions

I have an unordered list with a few list elements. #tags { width: 300px;
I have an unordered list, and am using jquery to find the last ul
I have an unordered list with elements and I want to append an item
I have an unordered list of form elements with ids <ul class=sortable id=userForm> <li
I have an unordered list, somthing like this <ul> <li> <div>filled with other stuff</div>
I have a unordered list, with each list element containing two spans (say span
I have an unordered list, and I am trying to insert an element at
I have an unordered list. <style> #button1 { position:relative; z-index: 3; } #button2 {
i have a unordered list of links, which are dynamically created by Ajax, and
I have an unordered list and the index of an li tag in that

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.