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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:41:44+00:00 2026-05-20T07:41:44+00:00

When a user focus a text field, I want the border, which is 1px,

  • 0

When a user focus a text field, I want the border, which is 1px, to be 2px, so In order to avoid the GUI feel jumpy, I set:

 margin-bottom:-2px; 

This plays nice in Firefox but not in Chrome, is this a bug? any solution to have this working in Chrome?

Problem I get is sometimes when I deselect the text field the border sort of stays. This is an example image:

problem in chrome

  • 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-20T07:41:44+00:00Added an answer on May 20, 2026 at 7:41 am

    You should use the outline instead of the border as that does not affect positioning and surrounding objects.

    To quote quirksmode.org:

    The outline of a box is almost the
    same as the border.

    The outline is not actually a part of
    the box, it does not count in any way
    towards the width or height of a box.

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

Sidebar

Related Questions

I have a text field which is validated whenever it loses focus. I want
I want to have a JTextField (or another text-like input which supports focus and
I have a Undecorated Modal JDialog which I want to setVisible(false) when the user
I want to detecting when a user clicks OUT of an input type Text
I want to disable the jQuery event if a Text box is in focus.
I would like to select the text of the input field which currently has
When the user sets the focus to an edit control on my HTML page,
If the user begins typing, and the focus happens to not be on the
I'm using jQuery to alter things when a user enters text into an input.
I have a fixed width input of type text. If the user was to

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.