Skip to content

Commit ee671a2

Browse files
author
psriraj3
committed
Issue with chrome browser fixed
1 parent f0cb2ef commit ee671a2

1 file changed

Lines changed: 75 additions & 4 deletions

File tree

src/index.css

Lines changed: 75 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,13 +450,32 @@ h1 { margin: 0; font-size: 22px; }
450450
}
451451
.siteMain { min-width: 0; }
452452

453-
.adRail {
454-
position: relative;
453+
/* ad rails sit in the gutters but do NOT “reserve” fixed 300px columns */
454+
.adRail{
455+
position: sticky;
456+
top: 16px;
455457
align-self: start;
456-
display: flex;
457-
justify-content: center;
458+
width: 300px;
459+
max-width: 300px;
460+
height: auto;
461+
min-height: 260px;
462+
opacity: 0.9;
458463
}
459464

465+
/* left rail hugs the center; right rail hugs the center */
466+
.siteGrid > .adRail:first-child{ grid-column: 1; justify-self: end; }
467+
.siteGrid > .adRail:last-child{ grid-column: 3; justify-self: start; }
468+
469+
/* Hide rails when screen isn’t wide enough for (app + 2 rails) */
470+
@media (max-width: 1580px){
471+
.siteGrid{ grid-template-columns: 1fr; padding: 18px 12px 52px; }
472+
.siteMain{ grid-column: 1; }
473+
.adRail{ display: none; }
474+
}
475+
476+
/* Prevent accidental horizontal scroll that makes things look “stuck left” */
477+
html, body{ overflow-x: clip; }
478+
460479
.adBox { width: 300px; min-height: 600px; }
461480

462481
.adFrame {
@@ -657,4 +676,56 @@ html:-webkit-full-screen .mobileAds,
657676
padding: 7px 9px;
658677
font-size: 12px;
659678
}
679+
}
680+
681+
/* ===========================================
682+
Chrome layout hardening / centering fix
683+
Paste at the VERY END of index.css
684+
=========================================== */
685+
686+
html, body {
687+
width: 100%;
688+
overflow-x: hidden;
689+
}
690+
691+
/* --- Layout: always-center main column, show ad rails only when there’s room --- */
692+
.siteGrid{
693+
display: grid;
694+
/* side gutters are flexible; center column is your app width */
695+
grid-template-columns: minmax(0, 1fr) minmax(0, var(--app-max)) minmax(0, 1fr);
696+
gap: 18px;
697+
padding: 28px 18px 64px;
698+
align-items: start;
699+
}
700+
701+
/* center column always centered */
702+
.siteMain{
703+
grid-column: 2;
704+
width: min(100%, var(--app-max));
705+
justify-self: center;
706+
}
707+
708+
/* The actual app container should always center */
709+
.siteMain > .container {
710+
width: 100%;
711+
max-width: var(--app-max);
712+
margin-left: auto;
713+
margin-right: auto;
714+
}
715+
716+
/* When ads collapse (single column), still center everything */
717+
@media (max-width: 1200px) {
718+
.siteGrid {
719+
grid-template-columns: 1fr !important;
720+
justify-content: stretch !important;
721+
}
722+
723+
.siteMain {
724+
justify-content: center;
725+
}
726+
727+
.siteMain > .container {
728+
padding-left: var(--pad);
729+
padding-right: var(--pad);
730+
}
660731
}

0 commit comments

Comments
 (0)