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

  • Home
  • SEARCH
  • 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 8076195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:12:47+00:00 2026-06-05T15:12:47+00:00

I am working on a web application (asp.net mvc3) I have a Main div.

  • 0

I am working on a web application (asp.net mvc3)

I have a Main div. I want to add lots of div inside that main div.

But I want them to be like this: Divs should appear next to each others on a line, and when there is no more space left, the next div will wrap to a new line.
(Similar to writing a text, when there is no more space on this line the next word will wrap to a new line)

I tried to use display: inline; to make the appear next to each others, but how can I make them wrap when they reach the end of the Main div?

Is there a way to do it without hard coding the positions? because divs are added dynamically so i don’t know how big will they be or their number

Thanks

  • 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-05T15:12:48+00:00Added an answer on June 5, 2026 at 3:12 pm

    Try display: inline-block – http://jsfiddle.net/7FJRr/1/

    UPDATE If IE7 is still a concern:

    div {
        display: inline-block;
        zoom: 1; 
        *display: inline;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on ASP.net MVC3 Web application that is facing scalability issue. For improving
I have Ninject working nicely in an ASP.NET MVC3 web application. I'd like to
I have been working on ASP.net MVC3 Web application using MSSQL 2008 R2 for
I'm working on a ASP.NET MVC3 web application and I want to create a
I am working on ASP.NET 4.0 MVC3 web application that works in intranet environment.
I'm working on Asp.net MVC3 web application. I'm having one page on which appx.
I'm currently working on web application using VB in ASP.NET. Right now I have
I'm working on a asp.net web application and one of the requirements is that
I'm working on a web application that uses ASP.NET 3.5 and C#. Structurally, I
I am working on web application .net 3.5,asp.net,C#. In that i need to provide

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.