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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:59:17+00:00 2026-05-15T11:59:17+00:00

I have a page with labels which are contained in a div, the labels

  • 0

I have a page with labels which are contained in a div, the labels has a variable with and i want to fill spaces between both with characters, dots or ‘-‘.

For example.

My label text 1 ———– Some Text Here.

My text 2 ———————– Another Text.

If you notice both text are justified (or at least i try), could be a problem of counting characters but character can have different width, any one knows a clean way of doing this programmatically in Asp.Net, css, jquery or anything else?

Update

…………….

Someone suggested in answers align both labels with css, but i think i will be having the same problem with the characters in the middle, which can be another label of course. Any thoughts?

Update

……………..

Answer from Patrick is really close to the solution, but now hyphens are not shown in IE8, maybe there is a miss understand in one of my comments, it should work on IE7, IE8 and Firefox, only these browsers.

Thanks to everyone.

  • 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-15T11:59:17+00:00Added an answer on May 15, 2026 at 11:59 am

    Try this: http://jsfiddle.net/FpRp2/4/ (updated, now works in ie7)

    The solution @Marcel gave to use a dashed border instead of text hyphens solved the final issue with IE7.

    (Note, I’ve only tested in Safari, Firefox and Chrome so far.)

    EDIT: IE8 works. Working on a fix for IE7.

    .outer {
      display: inline-block;
      *display: inline;
      zoom: 1;
      position: relative;
      clip: auto;
      overflow: hidden;
    }
    
    .container {
      position: relative;
      text-align: right;
      white-space: nowrap;
    }
    
    .filler {
      position: absolute;
      left: 0;
      right: 0;
      border-bottom: 1px dashed #333;
      height: 50%;
    }
    
    .label {
      background: white;
      float: left;
      margin-right: 20px;
      padding-right: 4px;
      position: relative;
    }
    
    .text {
      background: white;
      padding-left: 4px;
      position: relative;
    }
    <div class='outer'>
      <div class='container'>
        <div class='filler'></div>
        <span class='label'>some label</span>
        <span class='text'>some text</span>
      </div>
      <br>
      <div class='container'>
        <div class='filler'></div>
        <span class='label'>some other label</span>
        <span class='text'>some other text</span>
      </div>
    </div>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use ASP.NET and have a label control on my page, which I fill
I have Page Tab App, which has a landing page with a Log In
I have a page in JQuery mobile, which contains a form. The form has
I have a few labels on my page with a class of 'error', the
I have page which is redirected from htaccess. now I can pass the German
I have an ASP.net page which contains some controls. I generate this controls by
I have a page on which I'm using jQuery UI Tabs , what I'm
I have a div which contains two nested divs, one that specifies a height
I have a repeater which fetches data from a database and shows some labels
I have one page called myimage.aspx which creates random captcha image , <form id=form1

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.