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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:15:56+00:00 2026-06-05T15:15:56+00:00

First, I’ll start off by saying that I do not have control over the

  • 0

First, I’ll start off by saying that I do not have control over the HTML and this is what the HTML looks like:

<ul class="orbit-bullets">
  <li>1</li>
  <li>2</li>
</ul>

Second note I’ll put is that I wouldn’t mind using inline-block, but I need a fallback for non-supportive browsers.

I am trying to center the list. The list items must display inline but they must be block elements because I’m declaring a width, height and text-indent. So I know that I can use display:block; float:left;, but I would like the elements to be centered. And sometimes there are three list items or four or more, so I do not want to set a fixed width on the unordered list smaller than 500px. If I set the width to 500px, when there are just two or three list items, they appear very off centered.

I need to center the list items themselves within the unordered list while still using display:block; float:left;.
Or is there a way to have a variable width on the unordered list while still having it centered? I’m up to any suggestions.

Thanks.

  • 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-06-05T15:15:57+00:00Added an answer on June 5, 2026 at 3:15 pm

    Try this one – http://jsfiddle.net/jD6yp/

    ul {
        width: 500px;
        text-align: center;
        background: beige;
    }
    
    li {
        display: inline-block;
    
        zoom: 1;          /* for old IE-s */
        *display: inline; /* for old IE-s */
    
        padding: 10px;
        margin: 20px;
        border: 1px solid pink;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off I would like to say that I have done ample research on
First off I have an app that provides the user information about the amount
First let me preface this question by saying that I'm fairly new to Javascript.
First, let me say that I have been at this for far too long,
First off i am not all that familiar with the OOP side of Javascript
First off, I would like to make clear, that I am SUPER NEW TO
First off, let me clarify the platforms we are using. We have an ASP.NET
First, I have a dbcontext factory which is defined public class DatabaseFactory : Disposable,
First, I have a list of QWidget s that I won't know the length
First, my question might sound like a duplicate, but I have been going through

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.