@@ -177,6 +177,7 @@ img {
177177/* --- Styled Markdown Tables --- */
178178
179179table {
180+ /* Ensure tables expand to the full width of the text/page column */
180181 width : 100% ;
181182 border-collapse : collapse;
182183 border : 1px solid # d0d0d0 ; /* outer border */
@@ -187,10 +188,12 @@ table {
187188 box-shadow : 0px 2px 5px rgba (0 , 0 , 0 , 0.08 ); /* subtle lift */
188189}
189190
191+ /* Simple: enforce left alignment for all table cell text (headers + body) */
190192table th ,
191193table td {
192194 border : 1px solid # e5e5e5 ; /* internal grid lines */
193195 padding : 0.55em 0.75em ;
196+ text-align : left; /* TABLE TEXT LEFT ALIGNED */
194197}
195198
196199table th {
@@ -208,9 +211,53 @@ table thead th {
208211 border : 1px solid # 8b1628 !important ; /* darker crimson border */
209212}
210213
211- /* Left align table captions generated by Quarto */
212- .quarto-float-tbl .quarto-float-caption {
213- text-align : left !important ;
214+ /*
215+ Ensure table containers also stretch to the full width of the page's text column.
216+ Quarto often wraps tables in .quarto-table and/or .table-responsive, which may
217+ otherwise impose max-width constraints smaller than the page width.
218+ */
219+ .quarto-table ,
220+ .table-responsive {
221+ width : 100% !important ;
222+ max-width : 100% !important ;
223+ box-sizing : border-box !important ;
224+ }
225+
226+ /* Table floats/captions: ensure table + caption use full content width (don't shrink to caption) */
227+ .quarto-float ,
228+ .quarto-float-tbl {
229+ display : block !important ;
230+ width : 100% !important ;
231+ max-width : 100% !important ;
232+ box-sizing : border-box !important ;
233+ }
234+
235+ /*
236+ Style table captions so they:
237+ - are left aligned (as requested),
238+ - span the same width as the table,
239+ - use the same light gray background (#f5f5f5) as your outputs.
240+ */
241+ .quarto-float .quarto-float-caption ,
242+ .quarto-float-tbl .quarto-float-caption ,
243+ table caption {
244+ text-align : left !important ; /* TABLE CAPTIONS LEFT ALIGNED */
245+ width : 100% !important ;
246+ display : block !important ;
247+ box-sizing : border-box !important ;
248+ margin-bottom : 0.5em ;
249+ background-color : # f5f5f5 ; /* same gray as used elsewhere */
250+ padding : 0.4em 0.75em ;
251+ }
252+
253+ /* Make sure the actual table uses the full width of its float/container */
254+ .quarto-float-tbl table ,
255+ .quarto-float-tbl .quarto-table ,
256+ .quarto-float table ,
257+ .quarto-float .quarto-table {
258+ width : 100% !important ;
259+ max-width : 100% !important ;
260+ margin : 0 !important ;
214261}
215262
216263/* Center Quarto figures and their contents */
0 commit comments