Bootstrap snippet and html example. contact form with image

Bootstrap 4.5.0 snippet "contact form with image" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.
Tags: contact-form

HTML code

Clean, semantic HTML that powers this Bootstrap 4.5.0 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.

<section class="section" id="contact">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="title-box text-center">
                    <h3 class="title-heading mt-4">Let's talk about everything!</h3>
                    <p class="text-muted f-17 mt-3">Vivamus ac nulla ultrices laoreet neque mollis mi morbi
                        elementum mauris
                        sit amet arcu <br> fringilla auctor In eleifend maximus nisi sed vulputate.</p>

                    <img src="images/home-border.png" height="15" class="mt-3" alt="">
                </div>
            </div>
        </div>

        <div class="row mt-5 pt-4">
            <div class="col-lg-6">
                <div class="mt-4 home-img text-center">
                    <div class="animation-2"></div>
                    <div class="animation-3"></div>
                    <img src="https://themesdesign.in/thamza/layouts/images/features/img-3.png" class="img-fluid" alt="">
                </div>
            </div>

            <div class="col-lg-6">
                <div class="custom-form mt-4">
                    <div id="message"></div>
                    <form method="post" action="php/contact.php" name="contact-form" id="contact-form">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="form-group mt-3">
                                    <label class="contact-lable">First Name</label>
                                    <input name="name" id="name" class="form-control" type="text">
                                </div>
                            </div>

                            <div class="col-lg-6">
                                <div class="form-group mt-3">
                                    <label class="contact-lable">Last Name</label>
                                    <input name="name" id="lastname" class="form-control" type="text">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-lg-12">
                                <div class="form-group mt-3">
                                    <label class="contact-lable">Email Address</label>
                                    <input name="email" id="email" class="form-control" type="text">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-lg-12">
                                <div class="form-group mt-3">
                                    <label class="contact-lable">Subject</label>
                                    <input name="subject" id="subject" class="form-control" type="text">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="form-group mt-3">
                                    <label class="contact-lable">Your Message</label>
                                    <textarea name="comments" id="comments" rows="5" class="form-control"></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-lg-12 mt-3 text-right">
                                <input id="submit" name="send" class="submitBnt btn btn-primary btn-round" value="Send Message" type="submit">
                                <div id="simple-msg"></div>
                            </div>
                        </div>
                    </form>
                </div>

            </div>
        </div>

    </div>
</section>

CSS code

Scoped CSS that styles the component. Paste it after Bootstrap 4.5.0 to keep the design, spacing, and responsiveness consistent.

body{margin-top:20px;}
.custom-form .form-control {
    height: 44px;
    font-size: 15px;
    padding-left: 15px;
    border-color: #e6eef6;
    color: #828f99;
}
.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.custom-form .contact-lable {
    position: absolute;
    left: 27px;
    top: 7px;
    line-height: 20px;
    font-weight: 500;
    color: #828f99;
    background: #fbfdfe;
    margin: 0px;
    padding: 0px 7px;
    z-index: 1;
}
label {
    display: inline-block;
    margin-bottom: .5rem;
}

.custom-form .form-control {
    height: 44px;
    font-size: 15px;
    padding-left: 15px;
    border-color: #e6eef6;
    color: #828f99;
}
textarea.form-control {
    height: auto !important;
}
.home-img .animation-2 {
    border-radius: 50%;
    background-color: #2f3c71;
    -webkit-box-shadow: 0px 20px 30px 0px rgb(48 61 114 / 40%);
    box-shadow: 0px 20px 30px 0px rgb(48 61 114 / 40%);
    position: absolute;
    width: 25px;
    height: 25px;
    top: -60px;
    right: 60px;
    -webkit-animation: spin 2s infinite alternate;
    animation: spin 2s infinite alternate;
}
.home-img .animation-3 {
    border-radius: 50%;
    background-color: #f5828b;
    -webkit-box-shadow: 0px 20px 30px 0px rgb(245 130 139 / 40%);
    box-shadow: 0px 20px 30px 0px rgb(245 130 139 / 40%);
    position: absolute;
    width: 25px;
    height: 25px;
    bottom: 50px;
    left: -45px;
    -webkit-animation: spin 3s infinite alternate;
    animation: spin 3s infinite alternate;
}

/*** Spin 2 ***/
@-webkit-keyframes spin {
  0% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  100% {
    -webkit-transform: translateY(40px);
            transform: translateY(40px);
  }
}
@keyframes spin {
  0% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  100% {
    -webkit-transform: translateY(40px);
            transform: translateY(40px);
  }
}
Bootstrap example and template. bs5 dark footer

bs5 dark footer

Bootstrap example and template. career list

career list

Bootstrap example and template. contacts list table

contacts list table

Bootstrap example and template. project list

project list

FAQ

How do I use this snippet?

Include Bootstrap 4.5.0, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.

Can I use it in commercial projects?

Yes. It’s free for personal and commercial work; check the snippets license for details.

Is it responsive?

Yes. It inherits the responsive grid and components from Bootstrap 4.5.0.

Bootstrap example and template. contact form with image

About this bootstrap example/template

Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.

Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.

Already trusted in 1.5K+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

Bootstrap 4.5.0

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>

<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>

This code example is based on bootstrap 4.5.0 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working