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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:02:32+00:00 2026-06-04T14:02:32+00:00

I have what I want here , however I must manually enter the width.

  • 0

I have what I want here, however I must manually enter the width. I want to have a parent container that will hold the stretchable div that contains child divs. The parent container is a fixed size. I need the stretchable div to be large enough to horizontally contain the child divs. Setting the stretchable div to width auto does not work and I do not want to manually set the size. Is there another option besides manually setting the size?

#parent{
    width:50%;
    height:200px;
    background:red;
    overflow-x: scroll;
    overflow-y: hidden;
}

#stretchable-div{
    background:darkblue;
    /* width: 600px; works but don't want to manually size*/
    width: auto;
}

.child {
   background:blue;
   width: 100px;
   height: 150px;
   float:left;
}
  • 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-04T14:02:33+00:00Added an answer on June 4, 2026 at 2:02 pm

    If you need to make stretchable div auto width, it has to be decided by it’s children. Which is conflicting with children’s float property(floating behavior is decided by it’s parent width). So you have to change either of the parent’s width or children’s floating.

    I can use display: inline-block and nowrap property to make the chidlren in a single row. But you have to hack inline-block under IE7.
    The example is here.

    Cannot find a pretty nice solution for now. Just give it for a hint.

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

Sidebar

Related Questions

James here. I'm working on a site that I want to have the same
I want to be able to have default text like Enter content here... appear
I want to have a page redirect to another. Here is the situation: I
I want to have a UIImage as a background image on a UIView. Here
Here i want to do UDP Socket programming in C. I have one device
Placing an image inside a Span (here : HtmlGenericControl ) programmatically Want to have
I work for a travel agency, they have a website, from here they want
I have posted 3 queries here. Actually I want to join 1st & 2nd
I have a litte problem here. I want to join twice from the same
Here is what I want to achieve: I have RadGridView, let's call it gridView,

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.