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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:02:43+00:00 2026-06-17T16:02:43+00:00

How to stylize input box like image below using pure CSS. I know this

  • 0

How to stylize input box like image below using pure “CSS”. I know this can be done via jquery, but I am enthusiast if there is way to do so using CSS. I took image from Android’s Developer website.

input box

What I did is HTML,

<form>
    <label>Email Address: </label>
    <div class='left'></div>
    <input type='text' class='input'/>
    <div class='right'></div>
</form>

And CSS,

.left {
    display:inline-block;
    height:7px;
    border-left:1px solid #ccc;
    position:absolute;
    margin-top:23px;
}

.right {
    display:inline-block;
    height:7px;
    border-left:1px solid #ccc;
    position:absolute;
    margin-top:23px;
    margin-left:-1px;           
}

.input {
    display:inline-block;
    height:30px;
    font-size:16px;
    width:250px;
    border:1px solid  #ccc;
    border-width:0px 0px 1px 0px;
    padding:0px 5px;  
    outline:none;
}

.input:hover, .input:focus {
    border-color:#4ab5d9;
}

What I am trying is => Also on jsfiddle link

The only problem is, I can’t found way to change the color of left and right border on hover & on focus.

  • 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-17T16:02:43+00:00Added an answer on June 17, 2026 at 4:02 pm

    One option is this

    I used the sibling selector to get the hover and focus working:

    .input:hover, .input:focus,
    .input:hover + .right,
    .input:focus + .right {
        border-color:#4ab5d9;
    }
    

    and removed the “left” div. Then made these changes to the right one:

    margin-top:23px;
    margin-left:-260px;
    width:258px;
    pointer-events: none;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i stylize html5's range control to like this screenshot
Can i stylize QTreeWidgetItem like QCheckbox? For my checkboxes style is: QCheckBox { spacing:
I use CSS to stylize my pages. I use % style instead of using
I'm using datatables jquery plugin for beautifying my tables. I'm trying to stylize the
It works in Firefox, but not in Chrome: changing the css property 'background-image' via
I have created a 'noob' page and I want to stylize it using CSS,
I am designing a html form using JSP. Below is my css file- body
Is there a way I can use one category to stylize all of my
In my global.asax I have url routing setup like below: routes.MapPageRoute(User Logon, {Vendor}/Logon, ~/Logon.aspx);
This is how I construct my stylized buttons. <span class='button button-orange' id='sign-up'><input type='button' value='Sign

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.