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

  • Home
  • SEARCH
  • 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 6955525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:44:51+00:00 2026-05-27T14:44:51+00:00

I have a simple html layout here ( in jsfiddle ): <ul> <li> <label

  • 0

I have a simple html layout here (in jsfiddle):

<ul>
    <li>
        <label class="name">Name1:</label>
        <label class="value">value1</label>
    </li>
    <li>
        <label class="name">Name22222:</label>
        <label class="value">value22222</label>
    </li>
</ul>

I would like to left align the names & values, so I did the following CSS:

.name{
  font-weight: bold;
  text-align: left;
}

.value{
    text-align:left;
}

But they are not left aligned, where am I wrong?

—update–

I mean value1 and value22222 left align while name1 and name2222 left algin. You can see from my jsfiddle link that value1 and value22222 are not at the same left align level currently. I need it like this:

Name1:        value1
Name22222:    value22222
  • 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-27T14:44:52+00:00Added an answer on May 27, 2026 at 2:44 pm

    Everything looks left aligned to me.

    Do you, by chance mean you want everything on one line?

    .name{
    font-weight: bold;
    text-align: left;
    float: left;
    }
    
    .value{
    text-align:left;
    float:left;
    }
    

    jsfiddle here

    Based on your edit to the question…. the only way to accomplish that is to have a width for the .name class. Without a set width, .value will alway fall immediately to the left of .name and vertically, they will not align to the left.

    .name{
    font-weight: bold;
    text-align: left;
    display: inline-block;
    width:100px;}
    

    Of course, setting a width for the .name label present a problem since it’s assumed the .name content will be different lengths. You could set a width then add a text overflow option to prevent layout breaking…..

    .name{
    font-weight: bold;
    text-align: left;
    display: inline-block;
    width:50px;
    white-space: nowrap;
    text-overflow: ellipsis;}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple HTML layout: <div style=position:relative; width:200px> <div style=position:absolute; top:0; left:0; background-color:red;
I have done a simple tab layout by using html <ul><li> with some CSS
I have simple HTML code with some JavaScript. It looks like: <html> <head> <script
I have a simple HTML. I am using the JQuery for AJAX purpose. Now,
I have a simple html page with a div. I am using jQuery to
I have a simple html block like: <span id=replies>8</span> Using jquery I'm trying to
I have a simple HTML (as HTA) application that shows strange behavior on Windows
I have a simple HTML Table (10 columns x 500 rows). When the page
I have a simple html multiline tooltip implementation: this.tooltip = function(tag) { xOffset =
I have a simple html form. On php page. A simple list is placed

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.