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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:51:42+00:00 2026-06-09T21:51:42+00:00

I want this result: LEFT THING, not fixed here comes a text, which is

  • 0

I want this result:

LEFT THING, not fixed    here comes a text, which is 100% widthed in this "column"
width (content itself    but my problem is, when its too long, this column goes under the
determines that)         left column, so not left floated. I also want this text go and
                         go under and under, but normally, THIS LINE would continue under
                         the left column, which I dont want to. Its like table element
                         but its still considered bad for this situations :/

the DIV construction:

<div style="float: left">LEFT THING</div>
<div style="float: left">here comes a text, which...</div>

how to solve it?

  • 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-09T21:51:43+00:00Added an answer on June 9, 2026 at 9:51 pm

    Floated elements with width: auto are sized using the shrink-to-fit algorithm. That is, they attempt to grow as much as their content wants.

    To avoid this, you should limit the width, e.g. by setting an explicit width or an upper bound with max-width.

    Then, to make the following block grow to fill the remaining space, you should let it have the default float: none andwidth: auto, and establish a Block Formatting Context (BFC) to prevent it from overlapping the float.

    .wrapper, .main {
      overflow: hidden; /* Establish Block Formatting Context */
    }
    .left {
      float: left;
      max-width: 30%; /* Prevent it from growing too wide */
    }
    
    <div class="wrapper">
      <div class="left">...</div>
      <div class="main">...</div>
    </div>
    
    .wrapper, .main{
      overflow: hidden; /* Establish Block Formatting Context */
      text-align: justify;
    }
    .left {
      float: left;
      max-width: 30%; /* Prevent it from growing too wide */
      border: 1px solid blue;
    }
    .main {
      border: 1px solid red;
    }
    <div class="wrapper">
      <div class="left">LEFT THING LEFT THING LEFT THING LEFT THING</div>
      <div class="main">here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which... here comes a text, which...</div>
    </div>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First Table is the View and Second is the result I want This below
I want to execute a query like this var result = from entry in
I want to display result of this javascript in a label control on my
I want to get the result for the 3 most recent months. and this
Normally when I want to query large result set using Mysql I write this
I have trouble doing this... You may want to get the same result as
My jsfiddle is here http://jsfiddle.net/pedz/YG3bv/ The full page is http://jsfiddle.net/pedz/YG3bv/14/embedded/result/ This is my first
I am new to PHP. I just want to export data(the search result which
I want to see if the results of this call: NSDictionary *results = [jsonString
I want to paginate query results in CodeIgniter to look like this: Problem 1

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.