Many of the comments above address some of the layout issues you may be facing, but if you truly want to understand how to create responsive websites effectively (rather than just patching up specific problems on this site), you should start by avoiding the use of tables
for anything other than tabular data. It appears that you are using the table
tag for overall layout purposes, which severely restricts the adaptability, maintenance, and optimization of a website.
For creating grid layouts, it is recommended to utilize div
tags and CSS instead of tables. For example:
<table>
<tr>
<td>This is a grid item</td>
<td>This is another one!</td>
</tr>
</table>
Can be transformed into:
<div class="column">
<div class="row">This is a grid item</div>
<div class="row">This is another one!</div>
</div>
You can then add CSS like the following:
@media (min-width: 768px) {
.column {
display: grid;
grid-template-columns: 1fr 1fr;
}
}
If you need to support older browsers, consider floating the rows instead or use CSS float: left/right
declaration. The CSS grid
feature is supported in modern browsers, but not fully in IE11 or earlier versions (some buggy support in IE10-11).
While it's possible to make a table
collapse using CSS like so:
@media (max-width: 767px) {
table {
display: block;
}
}
This approach comes with various issues (especially concerning screen-reader accessibility) and has bugs across different browsers.
In summary, avoid using tables for layouts and reserve them for tabular data only (like ingredient lists). This change is crucial for optimizing your website to be truly responsive.