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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:28:41+00:00 2026-05-27T01:28:41+00:00

I added a css focus on input field. which has a default style which

  • 0

I added a css focus on input field. which has a default style which contains border and shadow. When I focus on the input field, the input field below moves down slightly. I tried adding a height to the li but that didn’t work.

   /* CSS


   input[type="text"], 
   input[type="password"] {

   border: 1px solid #CCCCCC;
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2);
  min-height: 22px;
 padding: 3px;

  }

 .checkout input:focus {
 border:3px solid #6b991c; 
 padding:2px;
 }

 */

<ul class="clearFix">
                    <li>                     
                      <label for="title" class="checkoutLabel">Title <strong class="requiredInfo">*</strong></label> 
                      <select name="title" id="title" class="required">
                        <option selected="selected">Please select</option>
                        <option value="Mr">Mr</option>
                        <option value="Mrs">Mrs</option>
                        <option value="Miss">Miss</option>
                        <option value="Dr">Dr</option>
                      </select>
                    </li>
                    <li class="active">
                      <label class="checkoutLabel" for="firstName">First name <strong class="requiredInfo">*</strong></label>
                      <div class="checkoutInputLarge">
                        <input type="text" name="firstName" id="firstName" class="required" />
                      </div>  
                    </li>
                    <li>
                        <label for="lastName" class="checkoutLabel">Last name <strong class="requiredInfo">*</strong> </label>
                        <div class="checkoutInputLarge active">
                            <input type="text" name="lastName" id="lastName" class="checkoutInput1 required" />   
                        </div>
                    </li>

                    <li>
                        <label for="email" class="checkoutLabel">Email <strong class="requiredInfo">*</strong></label> 
                        <div class="checkoutInputLarge">
                            <input type="text" name="email" id="email" class="required" />
                        </div>
                    </li>
                    <li>
                        <label for="phoneNumber" class="checkoutLabel">Phone number <strong class="requiredInfo">*</strong></label> 
                        <div class="checkoutInputLarge">
                            <input type="text" name="phoneNumber" id="phoneNumber" class="checkoutInput1 required" />
                        </div>
                    </li>
                    <li>
                      <input type="checkbox" name="smsAlert" id="smsAlert" /><label for="smsAlert" class="smsAlertLabel">I wish to receive SMS alerts on my order status</label>
                    </li>
                    <li>
                        <label class="checkoutLabel">Are you a <br /> business customer? <strong class="requiredInfo">*</strong></label> 
                        <input type="radio" name="businessCustomer" id="businessCustYes"  value="yes" class="radio required" /><label class="businessCustomerLabels" for="businessCustYes">Yes</label>
                        <input type="radio" name="businessCustomer" id="businessCustNo" value="no" class="radio required" checked="checked" /><label class="businessCustomerLabels" for="businessCustNo">No</label>
                    </li>
                  </ul> 
  • 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-27T01:28:41+00:00Added an answer on May 27, 2026 at 1:28 am

    Having a border where you didn’t have one before (or increasing the border-width) will effectively make the element larger, therefore potentially causing other elements to move. To avoid this, you should try to make sure the total size (height or width + padding + border + margin) is the same. In your case, I think you should try adding a 2px margin to the unfocused style to compensate (since the the border of the focused element is 2px larger). Try:

      input[type="text"], 
      input[type="password"] {
          border: 1px solid #CCCCCC;
          box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.2);
          min-height: 22px;
          padding: 3px;
          margin: 2px;
      }
    
     .checkout input:focus {
         border:3px solid #6b991c; 
         padding:2px;
         margin: 0;
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the inuit.css framework and added a css file which contains a
I have added css styles to my buttons which are nested within a panel.
I have added an CSS file this way: <link rel=stylesheet href=style.css type=text/css media=screen, print>
i am having a tag where i have added a Css for it as
I want my scripts and css files to be added in the footer and
Added: Working with SQL Server 2000 and 2005, so has to work on both.
I added some custom fields (public booleans) to the global class in global.asax.cs which
Im writing a new wordpress theme. i added my css html and js code
this is my code : <style type=text/css> #draggable { width: 100px; height: 100px; padding:
I build a simple list and added to it css. Now the vertical menu

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.