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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:01:51+00:00 2026-05-26T05:01:51+00:00

I got to deep in this problem and can not see the forest out

  • 0

I got to deep in this problem and can not see the forest out of all the trees around me… but maybe there is a quick solution for this. I work with CSS 3 and cannot add 2 div’s in one line with the following condition:
1. DIV dynamic width and cutting text.
2. DIV next to 1. DIV (inline) with fixed with.

So if the container (sourounding DIV) is 300px. And the 2. DIV is 100px. I expect that the 1. DIV gets a size of 200px (dynamic) and cutting its text if needed.

So this is the code from my side so far:

<!DOCTYPE html>
<html>
<head>
    <style type="text/css">
        .container {
            width: 200px;
            border: 1px solid black;
        }
        .info {
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
        .dynamicWidth {

        }
        .staticWidth {
            width: 60px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="dynamicWidth">
            <div>Title element</div>
            <div class="info">Text: This is a text which should be break with 3 dots when it is bigger then its parent div</div>
        </div>
        <div class="staticWidth">BUT</div>
    </div>
</body>

Unfortunately, all the time the 2. DIV is below the 1. DIV.

Thx for your hints.

  • 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-26T05:01:51+00:00Added an answer on May 26, 2026 at 5:01 am

    Ok, I found a fitting solution:

        <!DOCTYPE html>
    <html>
    <head>
        <style type="text/css">
            .container {
                border: 1px solid black;
                position: relative;
            }
            .info {
                text-overflow: ellipsis;
                overflow: hidden;
                white-space: nowrap;
            }
            .dynamicWidth {
                margin-right: 30px;
            }
            .staticWidth {
                position: absolute;
                top: 0;
                right: 0;
                width: 30px;
                top: 25%; /*centers the content of this div in middle of height*/
            }
        </style>
    </head>
    <body>
        <div class="container">
            <div class="dynamicWidth">
                <div>Title element</div>
                <div class="info">Text: This is a text which should be break with 3 dots when it is bigger then its parent div</div>
            </div>
            <div class="staticWidth">BUT</div>
        </div>
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to figure this out all night, but I guess my knowledge
I've got a tree view that can be anywhere from 1 level deep to
I'm working on this problem and I got the answers : Statically: 13 Dynamically
This may be a very basic question but somehow it got me tricked... when
I know you've got multiple topics touching on this. But, I havent found one
I know this is probably dead simple, but I've got some data such as
Got waist deep in a project that will involve presenting zoomable hi res catalog
I've got an XElement deep within a document. Given the XElement (and XDocument?), is
I'm fairly deep with Flash CS4 project. I've got Flex Builder now, and I
Got a class that serializes into xml with XMLEncoder nicely with all the variables

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.