Fix: CTA button contrast and author bio class collisions

- Replace btn/btn-secondary on CTA buttons with cta-btn/cta-btn-outline
  (isolated from global .btn-secondary { color: #144784 !important } cascade)
- Rename author-bio inner classes (author-info -> bio-info, etc.) to prevent
  collision with article inline <style> .author-info definitions
- Both issues were CSS class name conflicts, not specificity bugs
This commit is contained in:
root
2026-02-22 10:19:25 +00:00
committed by Peter Foster
parent 8731fd8fd7
commit da20f8e44c
3 changed files with 52 additions and 42 deletions

View File

@@ -4538,37 +4538,47 @@ body { font-size: 17px; }
flex-shrink: 0; flex-shrink: 0;
flex-wrap: wrap; flex-wrap: wrap;
} }
.article-cta .btn-primary { .cta-btn {
background: #f59e0b !important; display: inline-flex;
color: #1a1a1a !important; align-items: center;
border: none !important; justify-content: center;
padding: 0.75rem 1.5rem; padding: 0.75rem 1.5rem;
border-radius: 6px; border-radius: 6px;
font-weight: 700; font-weight: 700;
text-decoration: none !important; font-size: 0.95rem;
text-decoration: none;
white-space: nowrap; white-space: nowrap;
transition: background 0.2s; cursor: pointer;
box-shadow: none; transition: background 0.2s, border-color 0.2s;
line-height: 1.2;
} }
.article-cta .btn-primary:hover { background: #fbbf24 !important; color: #1a1a1a !important; } .cta-btn-primary {
.article-cta .btn-secondary { background: #f59e0b;
background: transparent !important; color: #1a1a1a;
color: #fff !important; border: 2px solid #f59e0b;
border: 2px solid rgba(255,255,255,0.7) !important; }
padding: 0.75rem 1.5rem; .cta-btn-primary:hover {
border-radius: 6px; background: #fbbf24;
font-weight: 600; border-color: #fbbf24;
text-decoration: none !important; color: #1a1a1a;
white-space: nowrap; text-decoration: none;
transition: border-color 0.2s, background 0.2s; }
box-shadow: none; .cta-btn-outline {
background: transparent;
color: #ffffff;
border: 2px solid rgba(255,255,255,0.8);
}
.cta-btn-outline:hover {
background: rgba(255,255,255,0.12);
border-color: #ffffff;
color: #ffffff;
text-decoration: none;
} }
.article-cta .btn-secondary:hover { border-color: #fff !important; background: rgba(255,255,255,0.1) !important; }
@media (max-width: 640px) { @media (max-width: 640px) {
.article-cta { padding: 1.5rem; } .article-cta { padding: 1.5rem; }
.article-cta .cta-inner { flex-direction: column; } .article-cta .cta-inner { flex-direction: column; }
.article-cta .cta-actions { width: 100%; } .article-cta .cta-actions { width: 100%; }
.article-cta .btn-primary, .article-cta .btn-secondary { text-align: center; flex: 1; } .cta-btn { text-align: center; flex: 1; width: 100%; }
} }
@@ -4584,7 +4594,7 @@ body { font-size: 17px; }
border-left: 4px solid #179e83; border-left: 4px solid #179e83;
} }
.author-avatar img { .bio-avatar img {
width: 80px; width: 80px;
height: 80px; height: 80px;
border-radius: 50%; border-radius: 50%;
@@ -4592,11 +4602,11 @@ body { font-size: 17px; }
border: 3px solid #179e83; border: 3px solid #179e83;
} }
.author-info { .bio-info {
flex: 1; flex: 1;
} }
.author-header { .bio-header {
font-size: 0.85rem; font-size: 0.85rem;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: 0.5px;
@@ -4605,28 +4615,28 @@ body { font-size: 17px; }
font-weight: 600; font-weight: 600;
} }
.author-name { .bio-name {
font-size: 1.25rem; font-size: 1.25rem;
font-weight: 700; font-weight: 700;
color: #1a1a1a; color: #1a1a1a;
margin: 0 0 4px 0; margin: 0 0 4px 0;
} }
.author-role { .bio-role {
font-size: 0.95rem; font-size: 0.95rem;
color: #666; color: #666;
margin: 0 0 12px 0; margin: 0 0 12px 0;
font-weight: 500; font-weight: 500;
} }
.author-description { .bio-description {
font-size: 0.95rem; font-size: 0.95rem;
color: #444; color: #444;
line-height: 1.6; line-height: 1.6;
margin: 0 0 16px 0; margin: 0 0 16px 0;
} }
.author-expertise { .bio-expertise {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: 8px; gap: 8px;
@@ -4649,7 +4659,7 @@ body { font-size: 17px; }
color: #555; color: #555;
} }
.author-social .linkedin-link { .bio-social .linkedin-link {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 6px; gap: 6px;
@@ -4660,7 +4670,7 @@ body { font-size: 17px; }
transition: color 0.2s; transition: color 0.2s;
} }
.author-social .linkedin-link:hover { .bio-social .linkedin-link:hover {
color: #005885; color: #005885;
text-decoration: underline; text-decoration: underline;
} }
@@ -4671,11 +4681,11 @@ body { font-size: 17px; }
text-align: center; text-align: center;
} }
.author-avatar { .bio-avatar {
margin: 0 auto; margin: 0 auto;
} }
.author-expertise { .bio-expertise {
justify-content: center; justify-content: center;
} }
} }

View File

@@ -106,8 +106,8 @@ $display_articles = array_slice($filtered_articles, 0, 3);
<p>UK Data Services delivers GDPR-compliant web scraping, data extraction, and analytics — tailored to your industry. 99.8% accuracy, fast turnaround, no long-term contracts.</p> <p>UK Data Services delivers GDPR-compliant web scraping, data extraction, and analytics — tailored to your industry. 99.8% accuracy, fast turnaround, no long-term contracts.</p>
</div> </div>
<div class="cta-actions"> <div class="cta-actions">
<a href="/quote.php" class="btn btn-primary">Get a Free Quote</a> <a href="/quote.php" class="cta-btn cta-btn-primary">Get a Free Quote</a>
<a href="/services/web-scraping.php" class="btn btn-secondary">See Our Services</a> <a href="/services/web-scraping.php" class="cta-btn cta-btn-outline">See Our Services</a>
</div> </div>
</div> </div>
</section> </section>

View File

@@ -110,7 +110,7 @@ $author_info = isset($authors[$author_name]) ? $authors[$author_name] : $authors
?> ?>
<div class="author-bio" itemscope itemtype="https://schema.org/Person"> <div class="author-bio" itemscope itemtype="https://schema.org/Person">
<div class="author-avatar"> <div class="bio-avatar">
<img src="<?php echo htmlspecialchars($author_info['image']); ?>" <img src="<?php echo htmlspecialchars($author_info['image']); ?>"
alt="<?php echo htmlspecialchars($author_name); ?>" alt="<?php echo htmlspecialchars($author_name); ?>"
loading="lazy" loading="lazy"
@@ -118,13 +118,13 @@ $author_info = isset($authors[$author_name]) ? $authors[$author_name] : $authors
height="80" height="80"
itemprop="image"> itemprop="image">
</div> </div>
<div class="author-info"> <div class="bio-info">
<h4 class="author-header">About the Author</h4> <h4 class="bio-header">About the Author</h4>
<p class="author-name" itemprop="name"><?php echo htmlspecialchars($author_name); ?></p> <p class="bio-name" itemprop="name"><?php echo htmlspecialchars($author_name); ?></p>
<p class="author-role" itemprop="jobTitle"><?php echo htmlspecialchars($author_info['role']); ?></p> <p class="bio-role" itemprop="jobTitle"><?php echo htmlspecialchars($author_info['role']); ?></p>
<p class="author-description" itemprop="description"><?php echo htmlspecialchars($author_info['bio']); ?></p> <p class="bio-description" itemprop="description"><?php echo htmlspecialchars($author_info['bio']); ?></p>
<div class="author-expertise"> <div class="bio-expertise">
<span class="expertise-label">Expertise:</span> <span class="expertise-label">Expertise:</span>
<?php foreach ($author_info['expertise'] as $skill): ?> <?php foreach ($author_info['expertise'] as $skill): ?>
<span class="expertise-tag"><?php echo htmlspecialchars($skill); ?></span> <span class="expertise-tag"><?php echo htmlspecialchars($skill); ?></span>
@@ -132,7 +132,7 @@ $author_info = isset($authors[$author_name]) ? $authors[$author_name] : $authors
</div> </div>
<?php if ($author_info['linkedin']): ?> <?php if ($author_info['linkedin']): ?>
<div class="author-social"> <div class="bio-social">
<a href="<?php echo htmlspecialchars($author_info['linkedin']); ?>" <a href="<?php echo htmlspecialchars($author_info['linkedin']); ?>"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"