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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:50:11+00:00 2026-06-18T05:50:11+00:00

Im trying to have a page widen as the div gets wider. Im using

  • 0

Im trying to have a page widen as the div gets wider. Im using C# , win forms and jquery. I have a repeater inside a div and each repeater item has a div with a set width and height set to 100%. I have all the divs set to float left. in chrome the page gets wider but in ie7, 8, 9 and FF the page doesnt get wider. currently we are in a process of moving our site over to use .less. the importance of this is that the page has a set width. In our instance we need to have the page grow wider.

Ive looked at setting the divs to display inline-block but that leaves white spaces between the divs. Ive seen a few ways around this by giving a negative margin or how the divs are arranged in the markup but Im not really a fan.

If you go to jsfiddle with the follow parameters i have an example. Im on mt tablet and for some reason i cant add a link.

/brad8118/7Wf2j/

<div id="outer">
<div class="inner">
</div>
<div class="inner">
</div>
<div class="inner">
</div>
</div>

#outer{
Height:30px;
Border: 1px solid black;
}

div{
Float: left;
}

.inner{
border: 1px solid red;
Background-color: green;
Width: 20px;
Height: 100%;
}

The inner divs are the ones created by the repeater.

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-18T05:50:12+00:00Added an answer on June 18, 2026 at 5:50 am

    you can try something like this

    jQuery extension:

    (function ($) {
    //calculates the total width of the elements selected
    $.fn.sumWidth = function () {
        var sum = 0;
        this.each(function () {
            sum += $(this).width();
    
        });
    
        return sum;
    };
    

    })(jQuery);

    then you can use it like this:

    $(function(){$('#outer').width($('#outer .inner').sumWidth());});
    

    this will then set the outer div width to the total width of the inner div’s width

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

Sidebar

Related Questions

I'm trying to have a page with a bunch of buttons, each of which
I have a page going here that uses jQuery: http://treethink.com/services What I am trying
Let's say I have six <div> elements inside a container <div> . Each of
I am trying to have jQuery append a Wide.css stylesheet to the page whenever
I have a page that I am trying to make a generic style of
I have a page with a form where I'm trying to prevent duplicate submission,
I'm trying to have a site set up so when the page loads there
I have am trying to create a simple voting page. There are a few
I have been trying to set the scroll of my page to a certain
Hi I have been trying to make a ajax call to a JSP page.

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.