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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:02:22+00:00 2026-06-15T01:02:22+00:00

Here are the thing, I would like to make the text ‘not all likely’

  • 0

Here are the thing, I would like to make the text ‘not all likely’ stick to number 1, and text ‘very likely’ stick to the last number. So if I have the number only 6, the button will center aligned and the text will follow the first and last button. How can I do that only with css?

button rate

So far I have my code like this

The HTML structure

<div class="module-block">
    <div class="num-block">
    <ul>
        <li><a href="javascript:void(0);">1</a></li>
        <li><a href="javascript:void(0);">2</a></li>
        <li><a href="javascript:void(0);">3</a></li>
        <li><a href="javascript:void(0);">4</a></li>
        <li><a href="javascript:void(0);">5</a></li>
        <li><a href="javascript:void(0);">6</a></li>
        <li><a href="javascript:void(0);">7</a></li>
        <li><a href="javascript:void(0);">8</a></li>
        <li><a href="javascript:void(0);">9</a></li>
        <li><a href="javascript:void(0);">10</a></li>
    </ul>
    </div>
    <div style="clear:both;">
        <span style="color:#ffffff; float:left;">not at all likely</span>
        <span style="color:#ffffff; float:right;" class="right">very likely</span>
    </div>
</div>

Here is the CSS code :

    ul { margin: 0; padding: 0; text-align: center;}
    li { margin:0 1px 0 0; display: inline-block; list-style: none;}
    a { display: inline-block; width: 33px; background-color: #E61968; color: #ffffff; font-size: 16px; font-weight: 600; line-height: 33px; text-align: center; text-decoration: none;}
    .module-block { width: 390px;}

Here is the jsfiddle link: http://jsfiddle.net/d433j/

  • 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-15T01:02:23+00:00Added an answer on June 15, 2026 at 1:02 am

    Place them inside the div that contains the numbers:

    <div class="module-block">
      <div class="num-block">
        <ul>
          <li><a href="javascript:void(0);">1</a></li>
          <li><a href="javascript:void(0);">2</a></li>
          <li><a href="javascript:void(0);">3</a></li>
          <li><a href="javascript:void(0);">4</a></li>
          <li><a href="javascript:void(0);">5</a></li>
          <li><a href="javascript:void(0);">6</a></li>
        </ul>
            <span style="float:left;">not at all likely</span>
            <span style="float:right;" class="right">very likely</span>
      </div>
    </div>​
    

    Also change the CSS, remove the center alignement of the ul (if you want to centre the block there are other ways). The key here is to float the block (and remove its width!), this way the captions below, will fit the block.

    CSS:
    (I placed a border at the outer block and removed some numbers to show that it works with less/different numbers)

    ul { margin: 0; padding: 0; text-align: left;}
    li { margin:0 1px 0 0; display: inline-block; list-style: none;}
    a { display: inline-block; width: 33px; background-color: #E61968;    color: #fff; font-size: 16px; font-weight: 600; line-height: 33px; text-align: center; text-decoration: none;}
    .module-block {width: auto; border: 1px blue solid; float: left;}
    

    Example:
    http://jsfiddle.net/d433j/2/

    EDIT:

    If you would like to center the block, and not knowing the width of the outer block, just set the outer block display to inline-block, add a position to it and to the numbers block. Aditionally, add the overflow: hidden to the numbers block to make it wrap the captions:

    New CSS:

    ul { margin: 0; padding: 0; text-align: left;}
    li { margin:0 1px 0 0; display: inline-block; list-style: none;}
    a { display: inline-block; width: 33px; background-color: #E61968;    color: #fff; font-size: 16px; font-weight: 600; line-height: 33px; text-align: center; text-decoration: none;}
    .module-block {display:inline-block;
        position:relative;
        left:50%;}
    .num-block {width: auto; border: 1px blue solid; position:relative;
        left:-50%; height: auto; overflow: hidden;}
    

    Example:
    http://jsfiddle.net/d433j/3/

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

Sidebar

Related Questions

Here's the thing. I have an interface, and I would to put the Include
Here's the thing. Recently I've tried to add FB like button to some website
I'd like to make a textbox that accepts only numbers, but not integer, but
I've been using Android ProgressBar quite a lot. The only thing here is for
And what if you want to autocomplete passwords? I am using similar thing here...
Here's the thing: I'm using the CommonJS way of making my mobile (iPhone/Android) application
Here's the thing: object[] arrayText = new object[1]; if (arrayText[1] == null) { MessageBox.Show(Is
Here is the thing. Right now I have this e-commerce web site where people
Here's the thing: In my Qt4.6-Project, I use a SQLite-Database. This database shouldn't be
Here is the thing. I currently have a tabBar controller, with several navigation controllers

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.