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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:59:43+00:00 2026-06-13T06:59:43+00:00

I am working on a web app with a visual component which needs to

  • 0

I am working on a web app with a visual component which needs to be ellipsized. The catch is that I need to have some other elements on the same line.

[ ellipsized text | element-x | element-y ]

I’ve tried doing things with floats to get everything on one line, but this prevents the element from ellipsizing.

The only solution I’ve come up with was to make element-y { position: fixed; top:0; right:0 }, but then I have to do a margin-right: xxx on the ellipsized text, which I’m okay with.

The problem is, element-x is an externalized string which comes from a translation file, so I don’t have a clean way of getting the width here.

Does anyone know of a clean way to achieve this? Ideally I want to avoid setting any widths on anything except element-y, which is an image.

  • 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-13T06:59:44+00:00Added an answer on June 13, 2026 at 6:59 am

    I’ve come up with a solution which seems to work well across different browsers:

    You have to wrap your ellipsized block element in an inline element. The way that the ellipsizing works, your ellipsized element needs to be constrained by something. Normally, that something is a static width. However, a max width, or an arbitrary constraint from a parent also works.

    <div class="container">
       <span style="display:inline; float: right;">
           Right-aligned elements
       </span>
       <span>
          <span class="ellipsized-block-text">Long text goes here</span>
       </span>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Visual Studio 2008 and VB.Net: I have a working web app that uses
I have a dataset in a Visual Studio 2010 Web App project which accesses
When I have a WinForms app that needs to do some heavy lifting in
I have a working web app which can do search for User objects through
I am working on a asp.net web app in visual studio team system 2008
I'm working on a web app that tracks workers check in and check out
I am working on a web app which makes use of a 3rd party
I'm working on a web app and I need to get a div to
I'm working on a web app for my company that will let us do
I am working on a web app that will generate an NxN grid based

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.