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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:11:07+00:00 2026-05-24T00:11:07+00:00

I am working on a page, where I am displaying some html components (surprisingly

  • 0

I am working on a page, where I am displaying some html components (surprisingly :P).

The requirement is that the size of all these html components change according to how the browser window is being re-sized or how the client side resolution is.

For example, If have reduced the size of my browser window to half, how do I get the components to reduce to half, automatically.

Any pointers towards this would be helpful.

EDIT :
The need is for the components to remain in the same left to right order i.e. introduce horizontal scroll bar if needed.

  • 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-24T00:11:08+00:00Added an answer on May 24, 2026 at 12:11 am

    Assuming you want to do this as easily as possible without JavaScript. In your css make sure the width and height attributes of anything you want to re-size are in percentages and not in pixels. Additionally if you need a child component re-size make that a percentage as well.

    For example

    If this is your html

    Where the container div is the html component you want to auto resize

    <div class="container">
    
        <h1> some heading</h1>
        <p>some paragraph text</p>
    
        <div class="childContainer">
            <p>some more text</p>
        </div>
    
    </div>
    

    do this in your css

    .container
    {
        width: 80%;
    }
    
    .someChildContainer
    {
       width: 50%;
    }
    

    not this

    .container
    {
         width: 800px;
    }
    

    By using the percentage in this example, say for instance your total browser width is initially 1000px; The container class div will display at 800px and the childContainer class will be 400px. If the user shrinks the browser to a width of 500px, the container class will shrink to 400px and the childContainer will shrink to 200px;

    In other words the percentage width of any child container is based on the current with a parent container. If there is no parent container the percentage width is relative to the html body tag which is most cases is the width of the entire browser window.

    Here is the markup based on your sample

        <html>
    <body>
    
    <style type="text/css">
        .alignLeft{ 
                float:left;
            }
    
        .container
        {
            width: 80%; 
            background-color:#ccc;
            float: left;
        }
    
        .fixedContainer
        {
            width: 900px;
            float: left;
            background-color:#aaa;
    
        }
    
        table
        {
           width: 300px;
           float: left;
    
        }
    </style>
    
    <div class="container">
    
    <div class="fixedContainer">
    
    <table class="searchCriteria alignLeft" cellpadding="1%"> 
    
     <tr> 
     <td><label for="proposalRefNum">Proposal Id :</label></td>
     <td><input type="text" name="proposalRefNum" onchange="removeSearchResults()" class="searchControl" value="" id="proposalRefNum" title="Type the Proposal RefNum you are looking for"></td> 
     </tr> 
    
      <tr> 
     <td><label for="proposalName">Name :</label></td> 
     <td><input type="text" name="Proposal Name" onchange="removeSearchResults()" value="" id="proposalName" class="searchControl" title="Type the Proposal description you are looking for"></td> 
     </tr> 
    
     <tr> 
     <td><label for="proposalDescription">Description :</label></td> 
     <td><textarea rows="2" name="Proposal description" onchange="removeSearchResults()" id="proposalDescription" class="searchControl" title="Type the Proposal description you are looking for"></textarea></td> 
     </tr> 
    
     <tr> 
     <td><label for="proposalApplication">Application :</label></td> 
     <td><select class="searchControl" name="application" id="proposalApplication" onchange="removeSearchResults()" title="Select the application for which you are searching the proposals">
        <option value="_ANY" selected="selected">ANY</option>
    </select></td>
     </tr> 
    
    </table>
    
    
    <table class="searchCriteria alignLeft" cellpadding="10px"> 
    
     <tr> 
     <td><label for="proposalReleaseCandidateRefNum">Release Candidate Id :</label></td>
     <td><input type="text" name="releaseCandidateRefNum" onchange="removeSearchResults()" class="searchControl"value="" id="proposalReleaseCandidateRefNum" title="Type the release Candidate RefNum you are looking for"></td> 
     </tr> 
    
    <tr> 
     <td><label for="proposalCreator">Creator :</label></td> 
     <td><input type="text" name="Proposal creator" onchange="removeSearchResults()"value="" id="proposalCreator" class="searchControl" title="Creator of the proposals you are looking for"></td> 
     </tr> 
    
     <tr> 
     <td><label for="proposalOwner">Owner :</label></td> 
     <td><input type="text" name="Proposal Owner" onchange="removeSearchResults()"value="" id="proposalOwner" class="searchControl" title="Owner of the proposals you are looking for"></td> 
     </tr> 
    
     <tr> 
     <td><label for="proposalLastUpdatedBy">LastUpdatedBy :</label></td> 
     <td><input type="text" name="Proposal Last Updated By" onchange="removeSearchResults()"value="" id="proposalLastUpdatedBy" class="searchControl" title="Users who last updated the proposals you are looking for"></td> 
     </tr> 
    
    <tr> 
     <td><label for="proposalStatus" >Status:</label></td> 
     <td><select class="searchControl" onchange="removeSearchResults()" name="status" id="proposalStatus" title="Status of the proposals you are looking for">
         <option value="_ANY" selected="selected">ANY</option>
    </select></td>
     </tr>
    </table> 
    
    </div>
    </div>
    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a web page where I'm making an AJAX call that returns
Currently I am working on a web page that has six ReportViewer controls that
I am working on a web page that is using jQuery. I have an
I am working an a search page that allows users to search for houses
I am displaying WordPress content on a static HTML page, which is outside of
I'm working on displaying a page of classifieds in table rows. The problem I'm
I am working on an ASP.NET 4.0 web forms project that uses page routing
I am working on a browser plugin for Firefox, Safari, Chrome that will intercept
I'm attempting to get my first ASP.NET web page working on windows using Mono
I'm working on a page has an ol with nested p's, div's, and li's.

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.