Not for publication
The purpose of this page is to keep internal notes regarding how the site was built.
Default Background Color
Set in WordPress > Appearance > Customize > Global > Colors > Content Background (not Site Background, but I set that similarly)
CSS is set in WordPress (not in Elementor)
CSS
Changes to CSS should only be made by the webmaster and only in a test environment.
Custom CSS is used at different levels. Sometimes at the site level. sometimes on individual widgets. It can also be set in Elementor > Custom code. We will not do that as it does not always work. The purpose of this section is to document the process for adjusting site-wide code in WordPress.
Sitewide code is set in Appearance > Customize > Additional CSS impacts the entire site.
Depending on the CSS, it may impact entire site or it may only impact widgets that reference it.
Menu Anchor CSS. The problem was that the menu anchors (on Pathology Services page and elsewhere) didn’t work quite right. The link would jump to the anchor, but the floating header on the page would hide the top of the section we were jumping to. Fix: Add custom CSS as follows:
Background Color CSS is in here too.
Tile CSS is in here for services
Tile CSS is in here for people tiles (about us)
- From WordPress – go to Appearance > Customize > Additional CSS
- Add the code seen there and pasted below.
- This applies to all menu anchors in the entire site.
- Adjust as needed here, keeping in mind the change will be global to the site.
- You DO NOT need to reference this CSS from any widget. It applies to all Elementor Anchors.
Code as of 2025-07-28 is below. I do not plan to update this page every time there is a code change.
/* =======================================
GLOBAL FIXES
======================================= */
/* Adjust scroll for anchored sections (so they are not hidden under the header) */
.elementor-menu-anchor {
display: block;
position: relative;
scroll-margin-top: 100px; /* Adjust this based on your header height */
}
/* Default background for Astra page-builder template */
.ast-page-builder-template,
.ast-plain-container {
background-color: #f0faff !important;
}
/* =======================================
SERVICE TILES
======================================= */
.service-tile {
border: 2px solid #aaa;
border-radius: 12px;
padding: 20px;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
justify-content: flex-end; /* content hugs the bottom */
background-color: #fff;
}
.service-tile:hover {
background-color: #e5edf2;
box-shadow: 0 0 16px rgba(12, 44, 75, 0.25);
transform: translateY(-4px);
cursor: pointer;
}
/* Remove extra space from the last paragraph */
.service-tile p:last-child {
margin-bottom: 0;
}
/* Remove default margins on headings and text inside service tiles */
.service-tile h1,
.service-tile h2,
.service-tile h3,
.service-tile h4,
.service-tile h5,
.service-tile h6,
.service-tile p {
margin: 0 !important;
padding: 0 !important;
line-height: 1.2;
}
/* Clean link styling in tiles */
.service-tile a {
display: inline-block;
margin: 0 !important;
padding: 0 !important;
line-height: 1.2;
text-decoration: none;
}
.service-tile .tile-subtitle {
font-size: 0.8em;
color: #6c757d;
margin-top: 4px;
}
/* Uniform image sizing in service tiles */
.service-tile img {
height: 160px; /* uniform height */
width: 100%;
object-fit: cover;
display: block;
}
/* =======================================
PERSON TILES
======================================= */
.person-tile {
display: flex;
flex-direction: column;
justify-content: flex-start;
background-color: #fff;
border-radius: 8px;
padding-bottom: 10px;
box-sizing: border-box;
min-height: 360px;
transition: all 0.3s ease;
}
.person-tile img {
width: 100%;
aspect-ratio: 4 / 5;
object-fit: cover;
padding: 10px;
box-sizing: border-box;
}
.person-tile h2,
.person-tile .job-title {
padding: 0 10px;
margin: 0.5em 0 0;
}
.person-tile:hover {
background-color: #e6f2fa;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
CSS that is set in Elementor (not in WordPress)
NONE. Don’t do this. It is inconsistent at best. I’ll set all sitewide CSS in WordPress.
Background colors (entire site)
The site background is set in the Astra theme. To change:
- In WordPress, go to Appearance > Customize
- Choose Additional CSS
- This code sets the background to light blue:
Links in bio tiles (in 'Meet Our Team')
Click the container that holds the tile and look at Advanced > Wrapper Link
Table of Contents on Sidebar of 'Services' pages
This was done using a ‘single page’ template and applying it to the pages where I want the sidebar to float. It is set to automatically pick up headers with style H2
- Go to Templates > Theme Builder from WordPress and see ‘Service Page Sidebar’
- Note that you can click ‘Edit Conditions’ here to designate what pages it applies to
- If you edit the page you will see lots of HTML on the left, and two sections in the page. It isn’t obvious how they were built, so:
- Process: WordPress > Templates > Theme Builder > Add New > Single Page
- Create a section, full width, with two containers (flexbox), one above the other
- Top container gets a ‘Post Content’ widget
- Top container also gets an HTML widget, under ‘Post Content’
- Bottom container gets a “Table of Contents’ widget
- Top container:
- Click ‘Advanced’ and set CSS Classes to “services-frame” (no quotes)
- ^^ this is referenced in HTML widget, see next few steps
- HTML widget gets a ton of code. See below for what it was initially set to in Services-Pathology
- Table of Contents widget has settings. I won’t go into all the detail here, but it is editable. Font size, bullets, etc. Some of it can be done in that HTML widget. Be careful.
Important Notes:
- When you come back to edit the template, the Table Of Contents widget does not appear! Which makes it hard to edit. To find it, right click on a container in the page and select ‘Structure’ then look for it within the container. If you click ‘Table of Contents’ in the Structure popup the widget settings appear on the left.
- This only gets applied to pages that are specified in the template
- The TOC will not appear if you do not set CSS Classes to ‘toc-float’ (no quotes) within the TOC widget on the Single Page template.
- This does not work if HERO section is not tagged!
- Go the the services page you want this to appear on and select the entire hero Container (look to top left for square icon to select it), then Advanced > CSS Classes > add hero (just the 4 letters)
- The TOC is set to appear when you scroll past the hero section. You must use the html widget to adjust where this happens, depending on the height of the header/hero section for the page.
- const REVEAL_EARLY = 100 in the html on the Service Page Sidebar (in WordPress > Templates > Theme Builder > Single Page > {page name that is applied to the services page, in this case ‘Service Page Sidebar} controls how high/low the TOC starts on the page.
- –header-offset: 220px in the same html code as the above bullet tells the page how much to adjust for the header height.
- If you have two pages you want to apply this to, and they have different heights for hero section then you must create another template. Where the TOC appears is set in the template html, as referenced in the above 2 bullet points, and is static.
HTML Code for ‘Services Page Sidebar’ as of 2025-08-27 (note the ‘header offset’ ):
<style>
/* Scope everything to this page’s template */
.services-frame{
–header-offset: 170px; /* tweak as needed */
–hero-max: 326px; /* your hero max height */
–toc-gap: 16px;
}
/* floating TOC */
.services-frame .toc-float{
position: fixed;
top: calc(var(–header-offset) + var(–hero-max) + var(–toc-gap));
left: 32px;
width: 280px;
max-height: calc(100vh – var(–header-offset) – 2*var(–toc-gap));
overflow: auto;
z-index: 999;
opacity: 0;
pointer-events: none;
transition: top .2s ease, opacity .2s ease;
}
/* dock under header once hero is out of view */
.services-frame .toc-float.is-visible{
top: var(–header-offset);
opacity: 1;
pointer-events: auto;
}
/* anchor offset for jumps */
.services-frame [id]{ scroll-margin-top: var(–header-offset); }
/* hide TOC on smaller screens */
@media (max-width: 1024px){
.services-frame .toc-float{ display:none; }
}
</style>
<script>
document.addEventListener(‘DOMContentLoaded’, () => {
const root = document.querySelector(‘.services-frame’);
const toc = root && root.querySelector(‘.toc-float’);
if (!root || !toc) return;
// Prefer a .hero section; fallback to the first Elementor section inside Post Content
const hero = document.querySelector(‘.hero’) || document.querySelector(‘.elementor-section’);
if (!hero) { toc.classList.add(‘is-visible’); return; }
const io = new IntersectionObserver(([entry]) => {
if (!entry.isIntersecting) toc.classList.add(‘is-visible’);
else toc.classList.remove(‘is-visible’);
}, { threshold: 0.01 });
io.observe(hero);
});
</script>