Skip to content

Contact Section with Details

Bootstrap 5 contact section with address, phone and email cards, copy buttons and a CSS map placeholder with opening hours.

Also known as: contact us section, contact details cards, address phone email section, contact page layout

Contact Section with Details live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

A Bootstrap 5 contact section with address, phone and email detail cards, one-click copy buttons and a CSS-only map placeholder with an opening hours panel. Use it on contact pages, store locators or the last section of a company landing page.

How it works

The root is section.ctd-section, which defines all colors as custom properties and paints a warm sand background. A Bootstrap row splits the content into a col-lg-5 text column and a col-lg-7 map column; below the lg breakpoint the map moves under the cards.

Each contact channel is an li.ctd-card: a rounded .ctd-icon tile with a Bootstrap Icon, a small uppercase .ctd-label, the main .ctd-value and a .ctd-note. The address uses a real address element. Phone and email values are tel: and mailto: links, so they work on mobile without JavaScript.

The map is drawn entirely in CSS. .ctd-map__canvas uses two repeating-linear-gradient layers for the street grid, and absolutely positioned spans add the river (.ctd-map__river), a park (.ctd-map__park) and two main roads. The .ctd-pin icon sits at the crossing and has a pulsing ring drawn with ::after. The .ctd-hours card floats over the bottom of the map and lists opening times in a dl.

The script runs on DOMContentLoaded for every .ctd-section. Buttons with data-ctd-copy copy their value with navigator.clipboard.writeText() and fall back to document.execCommand('copy'). On success the icon switches to a check mark for two seconds and .ctd-status confirms the copied value; if copying is blocked, the status shows the value so it can be selected by hand.

Customization

  • --ctd-accent and --ctd-accent-soft in .ctd-section: recolor the icon tiles, links, pin, badge and copy button hover state.
  • --ctd-bg and --ctd-surface in .ctd-section: change the section background and the card background.
  • --ctd-map-land, --ctd-map-water and --ctd-map-park in .ctd-section: restyle the placeholder map.
  • top: 44% and left: 62% in .ctd-pin: move the pin; keep them in sync with .ctd-map__road--h and .ctd-map__road--v.
  • data-ctd-copy on a .ctd-copy button: set the exact text that is copied, or remove the button to hide copying for that card.
  • Replace .ctd-map__canvas with an embedded map iframe that fills .ctd-map; the .ctd-hours card stays on top.
  • min-height: 22rem in .ctd-map: make the map taller on small screens.

Use cases

  • Company contact pages: address, phone and email cards sit beside a map placeholder and opening hours
  • Store locator pages: visitors see opening hours at a glance next to the location
  • Landing page footers: a final contact section gives visitors an easy way to reach out
  • Customer service pages: one-click copy buttons let users grab the email or phone number quickly

Accessibility

The section is labelled by its heading through aria-labelledby. Icons are aria-hidden, and each copy button has its own aria-label such as "Copy phone number". .ctd-status is a role="status" live region, so copy results are announced. The map placeholder is a single role="img" element with a descriptive label, while the opening hours stay outside it as readable text. Links and buttons get a solid :focus-visible outline, and the pulsing pin is static when prefers-reduced-motion is set.

Usage notes

Requires Bootstrap 5 (added automatically) and Bootstrap Icons. Clipboard access can be blocked in sandboxed iframes; the fallback message covers that case.

Contact Section with Details at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Contact Sections
License
Free for personal and commercial use

Questions about this template

Can I use the Contact Section with Details code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 5 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Contact Section with Details – free Bootstrap 5 contact section template
Contact Section with Details · free Bootstrap 5 contact section template

More Contact Sections

Split Contact Section with Form – free Tailwind CSS contact section template

Split Contact Section with Form

Tailwind CSS contact section with a gradient info panel beside a validated contact form, topic chips, character counter and a simulated send state.

Contact Section with Office Details – free WordPress contact section template

Contact Section with Office Details

A contact section with office details: address, phone, email and opening hours beside an office photo, with Call us and Get directions buttons for Gutenberg.

Office Locations with City Photos – free Bootstrap 5 contact section template

Office Locations with City Photos

Bootstrap 5 contact section with four office cards showing a city photo, address, phone, email, live local time, open/closed badge and directions link.