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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:56:27+00:00 2026-05-31T17:56:27+00:00

I would like to know if it is possible for block elements, floated in

  • 0

I would like to know if it is possible for block elements, floated in a direction, not to wrap when they exceed the width of the parent element.

That was the quick and short question, for a little more details and an example, please see below.

I have done some research about this and I have not found a definite answer of whether it is impossible or not and that is why I am looking for a definite answer here of whether this can be done or not.

And in the case that it is not possible, I would appreciate a quick explanation about it so that I can improve my understanding of how CSS works.

Please see the following example.

I have 1 “container” div and inside it I have 3 “row” divs. Let’s say the “container” has a hypothetical width of 200px and each “row” has a hypothetical width 100px. These values are not specified in the css, they vary based on the content on the page.

Each “row” is floated to the left so that they appear horizontally.

<div class="container">
    <div class="row">
        Some text
    </div>
    <div class="row">
        Some text
    </div>
    <div class="row">
        Some text
    </div>
</div>

.row {
    float: left;
}

In this case, when the total width of the “rows” exceeds the width of the “container”, is it possible for the “rows” not to wrap and to remain in a single horizontal line ?

Just to emphasize, I cannot specify an exact width for the “container” in the css because I want the layout dynamic in order to accommodate different content.

Thank you.

  • 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-31T17:56:28+00:00Added an answer on May 31, 2026 at 5:56 pm

    The behaviour you’re looking for can be achieved by replacing float: left with display: inline-block, and having white-space: nowrap on the parent container.

    See this fiddle: http://jsfiddle.net/XYzea/1/

    Blocks inside the container are aligned side by side (like float) but their parent has no width specified. By the way, the wrapper encloses nested divs. inline-block works in all modern browsers except IE<8 in which is not possible to use that display property with any hack if the element is a natural block element

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

Sidebar

Related Questions

I would like to know how is possible to read a file placed in
Hi I would like to know if its possible to do something similar to
I would like to know if it is possible to determine if a function
I would like to know if it is possible, To extract the userid from
I would like to know if it is possible, to select certain columns from
I would like to know whether it is possible to force LWP::UserAgent to accept
I would like to know if it is possible to copy/move files to a
I would like to know if it's possible to call a inline function with
I would like to know if it is possible to submit a flash form
I would like to know whether this is actually possible in Android? When Android

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.