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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:51:05+00:00 2026-06-05T21:51:05+00:00

I have a div: <div class=frame id=layer1> … </div> with the styling: .frame {

  • 0

I have a div:

<div class="frame" id="layer1"> ... </div>

with the styling:

.frame {
    position: absolute;
    width: 380px;
    height: 280px;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: 0;
}
#layer1  { background-color: red; color: #fff; }

But these are my results:

$(".frame").filter(":first").width(); // 384
$(".frame").filter(":first").outerWidth();  // 384
$(".frame").filter(":first").innerWidth();  // 384

I understand them all being the same since my padding and margins are 0, but where does this default 4px come from?

  • 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-05T21:51:07+00:00Added an answer on June 5, 2026 at 9:51 pm

    It got solved, thank you for you responses – it helped!

    Had something else performing an addition to the equation. Feel stupid even asking this but your answers and questions did help me get to the bottom of it! I should have posted the entire script:

    var layers = $(".frame");
    console.log(layers);
    
    var totalWidth = layers.size() + layers.filter(":first").innerWidth();
    console.log(totalWidth);
    

    As you see the problem lies in layers.size() + , it should have been multiplication and not addition and I should have seen it earlier.

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

Sidebar

Related Questions

I have something like this currently: <div class = className style = position: absolute;
When i have a div with position: absolute , and in it is another
I have this HTML: <div class=frame id=play> <img src=images/click.png alt=facebook> </div> <div class=frame id=maru>
I have a div having a css class MyClass. Inside this div, I can
I have many DIV with the same class name, let save wmplayer. I want
i have any div for show details of project ( class main ). now
I have this div inside a repeater, where i set the class, onmouseover and
I have a class of div MyClass I want to hook up to two
I have 8 divs. Each div has the class 'pre-loader'. In addition to thas
This is what I have and it works: $(function(){ $('.slide-out-div').tabSlideOut({ tabHandle: '.handle', //class of

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.