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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:21:42+00:00 2026-06-07T18:21:42+00:00

I have run into a little issue with placing divs inside a jQuery UI

  • 0

I have run into a little issue with placing divs inside a jQuery UI tabbed div to which I cannot find a logical solution (the illogical one I have in place and it works).

The problem is this

  1. I have a jQuery tab view (call it container) with three tabs
  2. The top most tab has three panels (divs) – call them toolbar, properties and editbox
  3. All three are floated left with the third one having the clear:right setting
  4. All three have a 3px badding and a 1px border
  5. All three have box-sizing:border-box
  6. The first two are, respectively,40px and 200px wide.
  7. The width of the third panel, editbox is set to 100px in CSS
  8. I then attempt to use a spot of jQuery to change that width to fill the available area. The calculation goes something like this

I don’t get it – I thought specifying border-box simply takes care of everything and I never need to worry about padding and border ever again. Evidently, I have got my understanding wrong. I’d much appreciate any help.

 var w = $('#container').width() - $('#toolbar').width - $('#properties').width;

//Now if I assign that to the editbox

$('#editbox').css('width',w + 'px') //I find that editbox flows down below the other two.  In order for things to work I have to deduct 24 fom the width calculation above.  i.e.

w -= 3x2*padding (2px) + 3*1*border(1 px)
  • 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-07T18:21:46+00:00Added an answer on June 7, 2026 at 6:21 pm

    Try using the outerWidth() function instead of width(). From jQuery’s documentation for outerWidth:

    Returns the width of the element, along with left and right padding,
    border, and optionally margin, in pixels.

    See more: http://api.jquery.com/outerWidth/

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

Sidebar

Related Questions

I have run into an issue when getting the jQuery UI dialog to popup
I have run into a little problem. I am connecting to a webservice that
I have a little bit of an odd issue. When I run this SQL:
I have run into a problem that is a little irritating. Here is my
Quick question: I've run into a little issue, where I just need some insight
I am currently using jQuery Mobile on a project and have run into a
Iam have run into a little problem with a partial projection. I have an
I have run into an issue with WPF and Commands that are bound to
I am just working on a simple little layout and I have run into
I am beginning to work with Express JS and have run into an issue.

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.