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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:45:59+00:00 2026-06-11T13:45:59+00:00

I am trying to create 3 divs that perform as columns. The left should

  • 0

I am trying to create 3 divs that perform as columns.

The left should stick to the left and be 175px.
The right should stick to the right and be 175px.
The middle should be 100% of the remaining width. (100%-(175px-175px))

This code is not working and I cannot figure out why. I feel like it is all correct but I cannot figure it out.

I tried javascript resize, what do you think?

  <script type="text/javascript">
$(function() {
   var newwidth = $(window).width() - 350;
   $("main_middle").css({width: newwidth+'px'});
});

$(window).resize(function() {
   var newwidth = $(window).width() - 350;
   $("main_middle").css({width: newwidth+'px'});
});
</script>

<div style="width:100%;height:100%;position:relative;margin:auto;">

<div style="position:fixed;width:175px;height:100%;margin-left:0;background-color:#222;">
</div>

<div id="main_middle" name="main_middle" style="float:left;position:absolute;height:100%;margin-left:175px;margin-top:38px;background-color:white;border-left:1px solid #A9A9A9;top:0px;left:0px;margin-right:200px;">
</div>


<div style="float:right;right:0px;position:relative;border-left:1px solid #A9A9A9;height:100%;background-color:white;margin-top:38px;width:200px;">
</div>

</div>

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-11T13:46:00+00:00Added an answer on June 11, 2026 at 1:46 pm

    I dont know if its a typo but you are missing the # in your JQuery call

    $("main_middle")
    

    should be

    $("#main_middle")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create some nested divs where the middle one should have
I'm trying to create slidingUp divs with variable 'top' heights, so that one div
I'm trying to create two buttons that using the hover event, hide some divs
I'm trying to create an if-else statement, that will return different divs. I believe
I'm trying to create a series of DIVs that become fixed at certain points
I am trying to create a series of divs that slowly fade into existence
I have a div with child divs that I'm trying to create a slideshow
Hi I am trying to create a jquery function that fades all other divs
I'm trying to dynamically create 5 divs that represent 5 days of the week.
I'm trying to create a simple ajax load test script that dynamically creates divs,

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.