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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:39:04+00:00 2026-05-13T14:39:04+00:00

Its in all in the title. I’m trying to get a div on the

  • 0

Its in all in the title.

I’m trying to get a div on the left of the page to a static width 170px; this works fine.

What I’m having issues with is getting a div next to it, that scales to fit the remaining width.

Is there a simple approach I can use here?

  • 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-13T14:39:05+00:00Added an answer on May 13, 2026 at 2:39 pm

    On the right-hand div, just set a margin:

    style="margin-left: 170px;"
    

    Here’s an example page, works here:

    <html>
      <head>
        <title>Jquery Test</title>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
        <script type="text/javascript">
          $(function()  {
            var right = $("#right");
            $("#toggle").click(function() {
              $("#left").animate({"width": "toggle"}, {
                duration: 250,
                step: function() {
                    right.css("margin-left", $(this).width());
                }
              }, function() { right.css("margin-left", $("#left").width()); });             
            });
          });
        </script>
        <style type="text/css">
          #left { width: 170px; float: left; border: solid 1px red; }
          #right { margin-left: 170px; border: solid 1px green; }
        </style>
      </head>
      <body>
        <div id="left">Test</div>
        <div id="right">Test Right</div>
        <input id="toggle" value="Open/Close" type="button" />    
      </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this hash: { title=>Navy to place breath-test machines on all its ships,
Sorry if this question seems a bit complex but I think its all related
Is all in the title, I do not understand the problem this time is
I don't know the best way to title this question but am trying to
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
It's all in the title; super-simple I reckon, but it's so hard to search
I've got the following snippet of code and its all working, and bringing in
i am making an mobile application of the site http://www.turrg.com in phonegap its all
I have a CCSprite that has all its properties modified: rotation, scale, skewX, skewY,
I want the mc to be removed with All its timers, events,... Is there

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.