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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:06:36+00:00 2026-05-26T22:06:36+00:00

I am trying to resize the div based on the current window /iframe size.

  • 0

I am trying to resize the div based on the current window /iframe size.

For example

if the size is 1200
i want to resize/adjust the size of the div

if the window is smaller then 800
I want to disable right part of the bar if the winnow/iframe is too small.

How can i do it using js or javascript
It can have 1 to 4 iframes columns, and could be in many different screen resolutions.

Thanks

I tried the following media queries code below, but when you have 2 iframe with 500 x500 each or i can have one iframe and the window size coudl be resized based on monitor /resolution etc.. I noticed that if i fix something .. somethingelse changes.

    @media screen and (min-width: 1200px) and (max-width: 1510px)  {
      #topbar {
    background-color: #E5EBF1;
        border: 0 solid red;
        font-size: 11px;
        height: 31px;
        padding: 0 0 0 2px;
        position: relative;
        width: 100%;
        z-index: 1111;
    }
    .objects-b {
      /*
      float: right;
      width: 64%;
      border: 0px solid green;
      margin: 0;
      padding: 7px 0 */
      display:none;
     }

     #topbar .hierarchialgroups-b {
        float: left;
      width: 240px;
      bordeR: 3px solid red;
    }
    .rest-b {
      /*
      padding: 0;
      margin: 0;
      border: 0px solid blue;
      width: 616px;
      align: right */
      display:none;
    }
    }
    @media screen and (min-width: 440px) and (max-width: 880px)  {
      #topbar {
    background-color: #E5EBF1;
        border: 0 solid red;
        font-size: 11px;
        height: 31px;
        padding: 0 0 0 2px;
        position: relative;
        width: 60%;
        z-index: 1111;
    }
    .objects-b {

      display:none;
     }

     #topbar .selectgroups-b {
        float: left;
      width: 39%;
      bordeR: 1px solid yellow;
    }
    .rest-b {

      display:none;
    }
    }

HTML BIT

    <div id="tbar" >

    <div class="hierarchialgroups-b"><strong>Showing:</strong><select
      id="groupselect">
      <option value="0" selected>...loading groups</option>
    </select></div>

    <div class="objects-b">
    <ul class="rest-b">
      <li><strong>Size Represents</strong>: #&nbsp;Objects</li>
      <li><strong>Color Represents</strong>: Group Impacts</li>
      <li><span class="color1">&nbsp;</span>Normal</li>
      <li><span class="color2">&nbsp;</span>Degraded</li>
      <li><span class="color3">&nbsp;</span>Critical</li>
    </ul>

    </div>
  • 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-26T22:06:37+00:00Added an answer on May 26, 2026 at 10:06 pm

    Use .resize() function

    $(window).resize(function() {
        var height=$(window).height();
        var width=$(window).width();
        $('#div').css({"width":width,"height":height});
    });
    

    Here is the code

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

Sidebar

Related Questions

I'm trying to figure out how to have a div dynamically resize, based on
I'm trying to resize a div on pageload and window resize. The code bellow
Im trying to create a 3 column DIV that allows me to resize the
How can I resize a Div on window resize, which the div is in
I'm trying to dynamicly resize text within a div so that the text does
i am trying to resize a called view based on the mouse wheel spin.
i trying to resize the height of a flash object to the size of
I'm trying to set a background image to fullscreen, and on window resize the
I'm trying to resize an embedded object. The issue is that when the mouse
I'm trying to resize an array of a certain class passed as an argument,

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.