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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:53:14+00:00 2026-06-12T23:53:14+00:00

Here’s an example of the problem I’ve encountered with a recent project: http://jsfiddle.net/ZCpAT/12/ Notice

  • 0

Here’s an example of the problem I’ve encountered with a recent project:

http://jsfiddle.net/ZCpAT/12/

Notice how after clicking on a box and adding the .highlighted-node class to it (which modifies border-width and border-color), the box contents shift a bit to the right in chrome and safari, and the previously highlighted box’s contents shift to the left. What’s weird is that when I try touching any style in any of the 2 classes using Chrome’s dev tools, all the div’s content’s return to their original position.

Am I missing something here to prevent this shifting behavior from happening?

  • 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-12T23:53:16+00:00Added an answer on June 12, 2026 at 11:53 pm

    Instead of messing with the width and height, you could change the padding to replace the border.

    In .node, the border is 1px and the padding is 4px on all sides. In .highlighted-node, the border is 5px, so the padding should be 4px smaller (=0px).

    http://jsfiddle.net/ZCpAT/16/

    Or, with a top padding of 15px/11px:

    http://jsfiddle.net/ZCpAT/19/

    To explain why your solution didn’t work:

    The size of the box remains the same, because you change width and height, but the box contents are not affected at all by the box’s width and height, because they are left (and top) aligned.

    The left position of the content = box margin + border + padding. So in one case it is 10 + 1 + 5 = 16px, while in the other it is 10 + 5 + 5 = 20px, shifting it 4px right (and down).

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

Sidebar

Related Questions

Here is a small demonstration of what my problem is: http://jsfiddle.net/k2Pqw/4/ After sizing the
Here's my code in the <head></head> : <link rel=stylesheet href=http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css /> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script>
Here is the code in a function I'm trying to revise. This example works
Here is what I am currently doing. PHP echo's out the recent post in
Here is an example: I write html code inside of textarea, then I swap
here is my configuration: http://domain.com (obviously fictitious name...) hosted on a server running Apache
Here is the code I'm using http://jsbin.com/evike5/edit When the jQuery UI dialog is fired
here is the site : http://www.notrepanorama.com at the bottom left, i use a jquery
Here's my problem I have this javascript if (exchRate != ) { function roundthecon()
Here is the problem that I am trying to solve. I have two folders

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.