@@ -166,6 +166,23 @@ a:hover {
166166 margin-top : var (--toolbar-height );
167167}
168168
169+ /* Prevent horizontal overflow on main content */
170+ .container {
171+ max-width : 100vw ;
172+ overflow-x : hidden;
173+ position : relative;
174+ }
175+
176+ /* Ensure code blocks, tables, and pre elements wrap or scroll within themselves */
177+ .container pre ,
178+ .container code ,
179+ .container table {
180+ max-width : 100% ;
181+ overflow-x : auto;
182+ word-break : break-word;
183+ white-space : pre-wrap;
184+ }
185+
169186/* Search Bar Styles */
170187
171188@media (max-width : 768px ) {
@@ -320,22 +337,41 @@ a:hover {
320337/* Page Navigation Arrow Buttons */
321338
322339.turn-page {
323- top : calc (100vh - 9rem );
324- top : calc (100dvh - 9rem );
340+ position : fixed !important ;
341+ left : 0 ;
342+ right : 0 ;
343+ bottom : 2rem ;
344+ top : auto !important ;
345+ transform : none !important ;
346+ z-index : 1000 ;
325347 display : flex;
326- z-index : 99999 ;
327348 justify-content : space-between;
328- position : -webkit-sticky; /* Safari */
329- position : sticky;
330- padding : 0 0.5rem 0 0.5rem ;
331- transform : translate (0 , 3rem );
332- height : 0 ;
349+ padding : 0 0.5rem ;
350+ height : auto;
351+ pointer-events : none; /* allow buttons to be clickable only */
352+ margin-left : 0 ;
333353}
334354
355+ .turn-page .arrow-btn {
356+ pointer-events : auto;
357+ }
358+
359+ /* Hide turn-page buttons on mobile when sidebar is open */
335360@media only screen and (max-width : 768px ) {
361+ .layout .has-sidebar .turn-page {
362+ display : none;
363+ }
364+
336365 .turn-page {
337- top : calc (100vh - 13rem );
338- top : calc (100dvh - 9rem );
366+ bottom : 4rem ;
367+ margin-left : 0 ;
368+ }
369+ }
370+
371+ /* Adjust turn-page positioning when sidebar is visible on larger screens */
372+ @media only screen and (min-width : 769px ) {
373+ .layout .has-sidebar .turn-page {
374+ margin-left : 375px ; /* Same as sidebar width */
339375 }
340376}
341377
0 commit comments