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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:35:27+00:00 2026-05-30T19:35:27+00:00

How do I design an HTML page such that on reducing the window to

  • 0

How do I design an HTML page such that on reducing the window to half width the HTML elements also get reduced to half width?

  • 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-30T19:35:29+00:00Added an answer on May 30, 2026 at 7:35 pm

    As per Tim’s original comment, you sort of have two choices which are not mutually exclusive (you can combine them).

    If you want the elements to scale, you just need to use percent values. To manage things, you probably want to set your minimum and maximum widths statically, and work it from there.

    CSS:

    div { margin: 0; padding: 0 }
    .pagewrapper { max-width: 1024px; min-width: 800px }
    .halfwidth { width:40%; margin-left:5%; margin-right: 5% }
    

    HTML:

    <div class="pagewrapper">
      <div class="halfwidth"></div>
      <div class="halfwidth"></div>
    </div>
    

    This is a stupidified example. It takes a bit of thought to do it right, possibly using classes for the first “column” and the last so that there’s only padding on one side or the other.

    In addition to or instead of fluidity there are media queries:

    @media only screen and (max-width: 1023px) {
    
      body {
        font-size: 0.8em;
        line-height: 1.5em;
      }
    
      .pagewrapper { 
        max-width: 1023px;
        min-width: 0;
       }
    
    }
    

    Again, possibly not the best example because there’s more to think about than just adjusting a few dimensions.

    All told… if you’re completely unfamiliar with the concept, I suggest learning from a framework that has already done most of the legwork (for example, 1140 grid at http://cssgrid.net) and then you’ll be able to pick and choose which techniques are right for you. Or at least read some articles, since an answer at SO isn’t going to get you far enough into an understanding of fluid and responsive layouts.

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

Sidebar

Related Questions

I have large number of form elements (80+) to design on the html page.
I'm trying to design a HTML page with the following requirements: a fixed header
Is it possible to post the whole html page to the server(assuming that the
I'm having trouble with a test site's design. When I'm opening my html page
From Android widget screen guidelines, http://developer.android.com/guide/practices/ui_guidelines/widget_design.html , we know that, home screen has 4*4
what basic tips should we observe in design web pages(html/css/javascript) for having highest compatibility
Intro I am in the process of trying to convert my first HTML/CSS design
Project: http://design.vitalbmx.com/fave/news.html When I click Add to favorites button (under main pic), in Chrome
Design patterns are great in that they distill a potentially complex technique into something
Our design has one jvm that is a jboss/webapp (read/write) that is used to

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.