How to change Bootstrap default input focus glow style?

How to change Bootstrap default input focus glow style?

Asked on November 1, 2018 in Bootstrap.
Add Comment

  • 1 Answer(s)

    Here CSS box-shadow Property can be used.
         By default, all the textual <input> elements, <textarea>, and <select> elements with the class .form-control highlighted in blue glow upon receiving the focus in Bootstrap.
    So, It can modifiy this default focus glow or shadow styles by simply setting the CSS border-color and box-shadow property.

    For example:

    <!DOCTYPE html>
    <html lang="en">
    <meta charset="UTF-8">
    <title>Override Bootstrap Input Focus Styles</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <script src=""></script>
    <script src="js/bootstrap.min.js"></script>
    <style type="text/css">
        .form-control:focus {
            border-color: #ff80ff;
            box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset, 0px 0px 8px rgba(255, 100, 255, 0.5);
            <div class="form-group">
                <input type="text" class="form-control" placeholder="Full Name">
            <div class="form-group">
                <textarea class="form-control" rows="4" placeholder="Mailing Address"></textarea>
            <div class="form-group">
                <select class="form-control">
            <div class="checkbox">
                <label><input type="checkbox"> Agree with Terms and Conditions</label>
            <button type="submit" class="btn btn-primary">Send</button>
    Answered on November 1, 2018.
    Add Comment

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.