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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:16:05+00:00 2026-05-24T12:16:05+00:00

jsFiddle: http://jsfiddle.net/mYkjQ/ How do I make div2 + Button2 fill the rest of the

  • 0

jsFiddle: http://jsfiddle.net/mYkjQ/

How do I make div2 + Button2 fill the rest of the window width?

Thank you.

CSS

td { border:solid 1px #000; float:left; }

#div1 { width:30%; border:solid 1px #000; float:left; }
#div2 { border:solid 1px #000; float:left; }
#div3 { width:30%; border:solid 1px #000; float:right; }

#Button1 { width:100% }
#Button2 { width:100% }
#Button3 { width:100% }

HTML

<div id="div1">
    <button id="Button1">Button 1</button>
</div>
<div id="div2">
    <button id="Button2">Button 2</button>
</div>
<div id="div3">
    <button id="Button3">Button 3</button>
</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-24T12:16:06+00:00Added an answer on May 24, 2026 at 12:16 pm

    The usual way to do it is to float all 3 div-s to left, and remove the border because on some browsers it would break because of that 1 pixel.

    If you really need the border then do this:

    <style type="text/css">
        #div1, #div3 { float:left; width:30%; }
        #div2 { float:left; width:40%; }
        #subdiv1, #subdiv2, #subdiv3 { border:solid 1px #000; }
        #Button1, #Button2, #Button3 { width:100% }
    </style>
    
    <div id="div1">
        <div id="subdiv1">
            <button id="Button1">Button 1</button>
        </div>
    </div>
    <div id="div2">
        <div id="subdiv2">
            <button id="Button2">Button 2</button>
        </div>
    </div>
    <div id="div3">
        <div id="subdiv3">
            <button id="Button3">Button 3</button>
        </div>
    </div>
    

    Edit1: jsfiddle for testing -> change the wrapper width to see that is scales to any width without breaking …

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

Sidebar

Related Questions

jsfiddle: http://jsfiddle.net/MFUw3/5/ jQuery: function showDiv() { if ($(window).scrollTop() > 610) { $(.a).css({position: fixed, top:
Consider this jsfiddle: http://fiddle.jshell.net/maple/JbEJN/show/ (this is the result window, in order for replaceState to
var x = window.Something; alert(window.x) when i try this code in jsfiddle http://jsfiddle.net/XJEGU/ ,
I'm struggling with an anchor (specifically a:hover) tag in CSS. Here's my JSFiddle: http://jsfiddle.net/yXwng/
JSFiddle: http://jsfiddle.net/dvF5d/2/ <input type=radio id=rad1 name=rad/><label for=rad1>rad1</label><br/> <input type=checkbox id=chk1/><label for=chk1>chk1</label><br/> <input type=radio id=rad2
Have a look at this jsfiddle: http://jsfiddle.net/Dh96F/1/ The Expand button will animate the widening
Here is the link to the jsfiddle: http://jsfiddle.net/d3xMZ/ when I hover, it does exactly
I have the following code that is working fine in jsfiddle - http://jsfiddle.net/darkajax/FHZBy/ I've
I have 2 internal div's within a main div JSfiddle - http://jsfiddle.net/uwdnH/ Illustration -
Going a little insane here. Here is the jsfiddle: http://jsfiddle.net/mersenneprimes/CvGKK/ Note business is in

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.