Skip to content

Commit 07ed848

Browse files
author
TechStack Global
committed
fix(images): remove invalid inline img styling breaking responsive object-fit grids and swipers over thumbnails
1 parent 05d482c commit 07ed848

12 files changed

Lines changed: 103 additions & 28 deletions

affiliate-disclosure.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</ul>
4545
</nav>
4646
</header>
47-
<main class="container section-padding" style="margin-top: 80px; max-max-width: 100%; height: auto;">
47+
<main class="container section-padding" style="margin-top: 80px; max-width: 800px;">
4848
<div class="glass-panel" style="padding: 4rem;">
4949
<h1 style="font-size: 2.5rem; margin-bottom: 2rem;">Affiliate <span class="accent">Disclosure</span></h1>
5050
<p style="font-size: 1.1rem; color: var( text-secondary); margin-bottom: 1.5rem;">At TechStack Global, we

amazon-stack.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ <h1>The Amazon Stack</h1>
9595
style="margin-bottom: 0.5rem; border-bottom: 1px solid var( accent); display: inline-block; padding-bottom: 5px;">
9696
Product Library
9797
</h2>
98-
<p style="color: var( text-muted); margin-bottom: 2rem; max-max-width: 100%; height: auto;">
98+
<p style="color: var( text-muted); margin-bottom: 2rem; max-width: 100%;">
9999
Hardware chosen for performance, reliability, and practical daily use.
100100
</p>
101101
<div class="blog-grid" style="grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));">
102102

103103
<!-- Bose QuietComfort Ultra -->
104104
<div class="product-item glass-card">
105105
<div class="product-thumbnail-wrapper">
106-
<img style="max-width: 100%; height: auto;" alt="Bose QuietComfort Ultra wireless headphones thumbnail" class="product-thumbnail"
106+
<img alt="Bose QuietComfort Ultra wireless headphones thumbnail" class="product-thumbnail"
107107
loading="lazy" src="posts/images/bose-qc-ultra-front.jpg" />
108108
</div>
109109
<div class="product-info">
@@ -117,7 +117,7 @@ <h3><a aria-label="Open review: Bose QuietComfort Ultra"
117117
<!-- Sony WH-1000XM5 -->
118118
<div class="product-item glass-card">
119119
<div class="product-thumbnail-wrapper">
120-
<img style="max-width: 100%; height: auto;" alt="Sony WH-1000XM5 wireless noise cancelling headphones thumbnail"
120+
<img alt="Sony WH-1000XM5 wireless noise cancelling headphones thumbnail"
121121
class="product-thumbnail" loading="lazy" src="posts/images/sony-wh-1000xm5-front.jpg" />
122122
</div>
123123
<div class="product-info">
@@ -132,7 +132,7 @@ <h3><a aria-label="Open review: Sony WH-1000XM5" href="posts/sony-wh-1000xm5-rev
132132
<!-- Samsung Odyssey G8 -->
133133
<div class="product-item glass-card">
134134
<div class="product-thumbnail-wrapper">
135-
<img style="max-width: 100%; height: auto;" alt="Samsung Odyssey G8 OLED monitor front view thumbnail" class="product-thumbnail"
135+
<img alt="Samsung Odyssey G8 OLED monitor front view thumbnail" class="product-thumbnail"
136136
loading="lazy" src="posts/images/odyssey-g8-front.jpg" />
137137
</div>
138138
<div class="product-info">
@@ -146,7 +146,7 @@ <h3><a aria-label="Open review: Samsung Odyssey G8 OLED"
146146
<!-- Alienware AW3423DWF -->
147147
<div class="product-item glass-card">
148148
<div class="product-thumbnail-wrapper">
149-
<img style="max-width: 100%; height: auto;" alt="Dell Alienware AW3423DWF QD-OLED monitor front view thumbnail"
149+
<img alt="Dell Alienware AW3423DWF QD-OLED monitor front view thumbnail"
150150
class="product-thumbnail" loading="lazy" src="posts/images/alienware-aw3423dwf-front.jpg" />
151151
</div>
152152
<div class="product-info">
@@ -160,7 +160,7 @@ <h3><a aria-label="Open review: Dell Alienware AW3423DWF"
160160
<!-- Shure SM7dB-->
161161
<div class="product-item glass-card">
162162
<div class="product-thumbnail-wrapper">
163-
<img style="max-width: 100%; height: auto;" alt="Shure SM7dB dynamic vocal microphone product thumbnail" class="product-thumbnail"
163+
<img alt="Shure SM7dB dynamic vocal microphone product thumbnail" class="product-thumbnail"
164164
loading="lazy" src="posts/images/shure-sm7db-primary.jpg" />
165165
</div>
166166
<div class="product-info">
@@ -176,7 +176,7 @@ <h3><a aria-label="Open review: Shure SM7dB Dynamic Microphone"
176176
<!-- Shure SM7B-->
177177
<div class="product-item glass-card">
178178
<div class="product-thumbnail-wrapper">
179-
<img style="max-width: 100%; height: auto;" alt="Shure SM7B dynamic studio microphone profile view thumbnail" class="product-thumbnail"
179+
<img alt="Shure SM7B dynamic studio microphone profile view thumbnail" class="product-thumbnail"
180180
loading="lazy" src="posts/images/shure-sm7b-primary.jpg" />
181181
</div>
182182
<div class="product-info">
@@ -191,7 +191,7 @@ <h3><a aria-label="Open review: Shure SM7B" href="posts/shure-sm7b-review.html">
191191
<!-- MacBook Pro-->
192192
<div class="product-item glass-card">
193193
<div class="product-thumbnail-wrapper">
194-
<img style="max-width: 100%; height: auto;" alt="Apple MacBook Pro M4 Pro product thumbnail" class="product-thumbnail" loading="lazy"
194+
<img alt="Apple MacBook Pro M4 Pro product thumbnail" class="product-thumbnail" loading="lazy"
195195
src="assets/images/macbook_hero.jpg" />
196196
</div>
197197
<div class="product-info">
@@ -205,7 +205,7 @@ <h3><a aria-label="Open review: Apple MacBook Pro M4 Pro"
205205
<!-- Dell XPS 15-->
206206
<div class="product-item glass-card">
207207
<div class="product-thumbnail-wrapper">
208-
<img style="max-width: 100%; height: auto;" alt="Dell XPS 15 9530 product thumbnail" class="product-thumbnail" loading="lazy"
208+
<img alt="Dell XPS 15 9530 product thumbnail" class="product-thumbnail" loading="lazy"
209209
src="assets/images/products/61Ks9X44eVL._AC_SL1181_.jpg" />
210210
</div>
211211
<div class="product-info">
@@ -219,7 +219,7 @@ <h3><a aria-label="Open review: Dell XPS 15 9530" href="posts/dell-xps-15-9530-r
219219
<!-- Surface Laptop Studio 2-->
220220
<div class="product-item glass-card">
221221
<div class="product-thumbnail-wrapper">
222-
<img style="max-width: 100%; height: auto;" alt="Surface Laptop Studio 2 product thumbnail" class="product-thumbnail" loading="lazy"
222+
<img alt="Surface Laptop Studio 2 product thumbnail" class="product-thumbnail" loading="lazy"
223223
src="assets/images/products/61LMopCIyTL._AC_SL1200_.jpg" />
224224
</div>
225225
<div class="product-info">
@@ -234,7 +234,7 @@ <h3><a aria-label="Open review: Surface Laptop Studio 2"
234234
<!-- Samsung SSD-->
235235
<div class="product-item glass-card">
236236
<div class="product-thumbnail-wrapper">
237-
<img style="max-width: 100%; height: auto;" alt="Samsung 990 PRO SSD 2TB product thumbnail" class="product-thumbnail" loading="lazy"
237+
<img alt="Samsung 990 PRO SSD 2TB product thumbnail" class="product-thumbnail" loading="lazy"
238238
src="assets/images/samsung-990-pro-primary-v3.jpg?v=final_v3" />
239239
</div>
240240
<div class="product-info">
@@ -249,7 +249,7 @@ <h3><a aria-label="Open review: Samsung 990 PRO SSD 2TB"
249249
<!-- LG Monitor-->
250250
<div class="product-item glass-card">
251251
<div class="product-thumbnail-wrapper">
252-
<img style="max-width: 100%; height: auto;" alt="LG 27US500-W 4K Monitor product thumbnail" class="product-thumbnail" loading="lazy"
252+
<img alt="LG 27US500-W 4K Monitor product thumbnail" class="product-thumbnail" loading="lazy"
253253
src="assets/images/products/lg-27us500w-primary.jpg" />
254254
</div>
255255
<div class="product-info">
@@ -264,7 +264,7 @@ <h3><a aria-label="Open review: LG 27US500-W 4K Monitor"
264264
<!-- Dell Dock-->
265265
<div class="product-item glass-card">
266266
<div class="product-thumbnail-wrapper">
267-
<img style="max-width: 100%; height: auto;" alt="Dell SD25TB4 Pro Dock product thumbnail" class="product-thumbnail" loading="lazy"
267+
<img alt="Dell SD25TB4 Pro Dock product thumbnail" class="product-thumbnail" loading="lazy"
268268
src="assets/images/products/dell-sd25tb4-box.jpg" />
269269
</div>
270270
<div class="product-info">

clean_img_styles.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
const fs = require('fs');
2+
3+
function fixImages(filePath) {
4+
if (!fs.existsSync(filePath)) return;
5+
let content = fs.readFileSync(filePath, 'utf8');
6+
let originalContent = content;
7+
8+
// Remove the intrusive inline style from our previous bulk script
9+
// that ruins object-fit by forcing height: auto.
10+
11+
// Specific match for product-thumbnails and swiper slides that had this injected:
12+
// Actually, let's just safely strip `style="max-width: 100%; height: auto;"`
13+
// and `style="max-width: 100%; height: auto; "` if it's there.
14+
// Also remove generic inline style if it ONLY contains that.
15+
16+
content = content.replace(/style=["']max-width:\s*100%;\s*height:\s*auto;?\s*["']/gi, '');
17+
18+
// For images that had object-fit contain inside the inline style like we saw in some debug output:
19+
content = content.replace(/style=["']max-width:\s*100%;\s*height:\s*auto;\s*object-fit:\s*contain;?["']/gi, 'style="object-fit: contain;"');
20+
21+
// Clean up empty styles
22+
content = content.replace(/style=["']\s*["']/gi, '');
23+
24+
if (content !== originalContent) {
25+
fs.writeFileSync(filePath, content);
26+
console.log(`Fixed images in ${filePath}`);
27+
} else {
28+
console.log(`No changes needed for ${filePath}`);
29+
}
30+
}
31+
32+
// Fix the two pages the user explicitly mentioned
33+
fixImages('amazon-stack.html');
34+
fixImages('index.html');

contact.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
extra
5959
cost to you.
6060
</div>
61-
<main class="container section-padding" style="margin-top: 80px; max-max-width: 100%; height: auto;">
61+
<main class="container section-padding" style="margin-top: 80px; max-width: 800px;">
6262
<div class="glass-panel" style="padding: 4rem;">
6363
<h1 style="font-size: 2.5rem; margin-bottom: 2rem;">Get in <span class="accent">Touch</span></h1>
6464
<form action="https://formsubmit.co/techstackglobal9@gmail.com" method="POST" style="display: flex; flex-direction: column; gap: 1.5rem;">

fix_max_width.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
function getHtmlFiles(dir, files_) {
5+
files_ = files_ || [];
6+
let files = fs.readdirSync(dir);
7+
for (let file of files) {
8+
let name = path.join(dir, file);
9+
if (fs.statSync(name).isDirectory()) {
10+
if (!['.git', 'node_modules', 'images', 'assets'].includes(file)) {
11+
getHtmlFiles(name, files_);
12+
}
13+
} else if (name.endsWith('.html') && !name.startsWith('old_')) {
14+
files_.push(name);
15+
}
16+
}
17+
return files_;
18+
}
19+
20+
const allHtmlFiles = getHtmlFiles('.');
21+
22+
allHtmlFiles.forEach(file => {
23+
let content = fs.readFileSync(file, 'utf8');
24+
let originalContent = content;
25+
26+
// Replace the botched max-max-width typo
27+
// Previously it might have been max-width: 600px;
28+
// Let's just fix it to max-width: 600px; or let's inspect what it should be.
29+
// Actually, wait, replacing max-width: 600px with max-width: 100%; is safer
30+
// than height: auto which breaks the swiper completely!
31+
// Let's just change "max-max-width: 100%; height: auto;" to "max-width: 600px;"
32+
// No, wait, if it was in index.html for .hero-swiper-shell: it was `width: 100%; max-width: 800px;`.
33+
// Wait, the regex was `width:\s*[4-9][0-9]{2,}px;?` which matched `width: 800px` maybe?
34+
35+
content = content.replace(/max-max-width:\s*100%;\s*height:\s*auto;/gi, "max-width: 800px;");
36+
37+
if (content !== originalContent) {
38+
fs.writeFileSync(file, content);
39+
console.log(`[Fixed max-max-width] ${file}`);
40+
}
41+
});

index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<div class="hero-content">
103103
<h1>Make Smarter <br /><span class="gradient-text">Tech Decisions.</span>
104104
</h1>
105-
<p class="hero-sub" style="font-size: 1.25rem; max-max-width: 100%; height: auto; margin-top: 1rem;">No hype. No
105+
<p class="hero-sub" style="font-size: 1.25rem; max-width: 100%; margin-top: 1rem;">No hype. No
106106
fluff.
107107
Just clear guidance on the tech that powers modern work.</p>
108108

@@ -114,7 +114,7 @@ <h1>Make Smarter <br /><span class="gradient-text">Tech Decisions.</span>
114114
<style>
115115
.hero-swiper-shell {
116116
position: relative;
117-
max-max-width: 100%; height: auto;
117+
max-width: 100%;
118118
margin: 0 auto;
119119
display: flex;
120120
align-items: center;
@@ -261,7 +261,7 @@ <h1>Make Smarter <br /><span class="gradient-text">Tech Decisions.</span>
261261
}
262262

263263
/* Mobile Responsiveness */
264-
@media (max-max-width: 100%; height: auto;) {
264+
@media (max-width: 600px) {
265265
.swiper-card-effect {
266266
height: 440px;
267267
max-width: 280px;
@@ -306,7 +306,7 @@ <h1>Make Smarter <br /><span class="gradient-text">Tech Decisions.</span>
306306
style="font-size: 0.75rem; color: var(--accent); font-weight: bold; text-transform: uppercase; margin-bottom: 0.5rem;">
307307
<i class="fa-solid fa-headphones"></i> Audio
308308
</div>
309-
<img style="max-width: 100%; height: auto;" src="posts/images/sony-wh-1000xm5-front.jpg" alt="Sony WH-1000XM5" loading="lazy">
309+
<img src="posts/images/sony-wh-1000xm5-front.jpg" alt="Sony WH-1000XM5" loading="lazy">
310310
<h3>Sony WH-1000XM5</h3>
311311
<p>Top-tier active noise cancellation and supreme all-day comfort for deep focus sessions.</p>
312312
<a class="hero-read-btn" href="posts/sony-wh-1000xm5-review.html">
@@ -320,7 +320,7 @@ <h3>Sony WH-1000XM5</h3>
320320
style="font-size: 0.75rem; color: var(--accent); font-weight: bold; text-transform: uppercase; margin-bottom: 0.5rem;">
321321
<i class="fa-solid fa-microphone"></i> Broadcasting
322322
</div>
323-
<img style="max-width: 100%; height: auto;" src="posts/images/shure-sm7db-primary.jpg" alt="Shure SM7dB Microphone" loading="lazy">
323+
<img src="posts/images/shure-sm7db-primary.jpg" alt="Shure SM7dB Microphone" loading="lazy">
324324
<h3>Shure SM7dB</h3>
325325
<p>The industry standard podcast microphone, now powered with a built-in clean preamp.</p>
326326
<a class="hero-read-btn" href="posts/shure-sm7db-review.html">
@@ -334,7 +334,7 @@ <h3>Shure SM7dB</h3>
334334
style="font-size: 0.75rem; color: var(--accent); font-weight: bold; text-transform: uppercase; margin-bottom: 0.5rem;">
335335
<i class="fa-solid fa-desktop"></i> Displays
336336
</div>
337-
<img style="max-width: 100%; height: auto;" src="posts/images/alienware-aw3423dwf-front.jpg" alt="Alienware AW3423DWF" loading="lazy">
337+
<img src="posts/images/alienware-aw3423dwf-front.jpg" alt="Alienware AW3423DWF" loading="lazy">
338338
<h3>Alienware AW3423DWF</h3>
339339
<p>Stunning QD-OLED ultrawide performance delivering flawless visual immersion.</p>
340340
<a class="hero-read-btn" href="posts/alienware-aw3423dwf-review.html">
@@ -388,7 +388,7 @@ <h2>Explore the Stack</h2>
388388
<p>Browse hardware and smart digital tools by category</p>
389389
</div>
390390
<div class="category-grid"
391-
style="grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-max-width: 100%; height: auto; margin: 0 auto;">
391+
style="grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 100%; margin: 0 auto;">
392392
<a class="cat-card featured-cat" href="amazon-stack.html">
393393
<i class="fa-brands fa-amazon"></i>
394394
<h3>Amazon Stack</h3>
@@ -411,7 +411,7 @@ <h3>Smart Tools</h3>
411411
<!-- Lead Capture / Newsletter CTA -->
412412
<section class="newsletter-section section-padding">
413413
<div class="container cta-box glass-panel"
414-
style="border: 1px solid var(--border-glass); padding: 2.5rem; border-radius: var(--border-radius); text-align: center; max-max-width: 100%; height: auto; margin: 0 auto;">
414+
style="border: 1px solid var(--border-glass); padding: 2.5rem; border-radius: var(--border-radius); text-align: center; max-width: 100%; margin: 0 auto;">
415415
<h2 style="font-size: 2.2rem; margin-bottom: 0.5rem;">Get Practical Tech Picks</h2>
416416
<p style="font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 2rem;">Weekly
417417
reviews, guides, and curated deals for smart tech buyers.</p>

old_amazon_stack.html

35.2 KB
Binary file not shown.

posts/alienware-aw3423dwf-vs-odyssey-g8.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ <h3><i class="fa-solid fa-laptop" style="color: #00c8ff;"></i> Buy Odyssey If:</
307307
style="padding: 2.5rem; border-top: 4px solid var(--accent); margin-top: 3rem; text-align: center;">
308308
<h2>Final Recommendation: Which is Better?</h2>
309309
<p
310-
style="font-size: 1.15rem; line-height: 1.8; margin-bottom: 2rem; max-max-width: 100%; height: auto; margin-left: auto; margin-right: auto;">
310+
style="font-size: 1.15rem; line-height: 1.8; margin-bottom: 2rem; max-width: 800px; margin-left: auto; margin-right: auto;">
311311
For most clean desk setups and hybrid users, the <strong>Samsung Odyssey G8</strong> offers greater
312312
versatility thanks to its USB-C 65W charging and Smart TV capabilities. It is a stunning piece of
313313
design that functions as both a high-end monitor and a standalone media hub. However, for pure

privacy-policy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<style>
3030
body {
3131
padding: 2rem;
32-
max-max-width: 100%; height: auto;
32+
max-width: 800px;
3333
margin: 0 auto;
3434
line-height: 1.6;
3535
}

smart-tools.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ <h1>Smart Tools</h1>
8181
<i class="fa-solid fa-clock-rotate-left"
8282
style="font-size: 3rem; color: var(--accent); margin-bottom: 1.5rem;"></i>
8383
<h2>Content Coming Soon</h2>
84-
<p style="color: var(--text-secondary); max-max-width: 100%; height: auto; margin: 0 auto;">We are currently evaluating the
84+
<p style="color: var(--text-secondary); max-width: 800px; margin: 0 auto;">We are currently evaluating the
8585
best AI tools, software suites, and digital productivity solutions for 2026. Stay tuned for our upcoming
8686
guides.</p>
8787
<a href="index.html" class="btn-secondary" style="margin-top: 2rem; display: inline-block;">Return Home</a>

0 commit comments

Comments
 (0)