Forum Moderators: not2easy
<table width="100%">
<tr><td align="left">
<a href="https://www.example.com/ubbthreads/"><img src="https://www.example.com/ubbthreads/images/bbtitle_2020.jpg" width="450" border="0" alt="The example.com Forums"/></a></td>
<td align="right"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-weight:bold;font-size:10pt">
<a href="https://www.example.com/">Home</a> | <a href="https://www.example.com/faq">FAQ</a>
| <a href="https://www.example.com/ubbthreads/">Forum</a>
| <a href="https://www.example.com/ubbthreads/ubbthreads.php?ubb=cfrm&c=3">Swap
Meet</a> | <a href="https://www.example.com/gallery">Gallery</a> |
<a href="https://www.example.com/techtips/">Tech Tips</a> | <a href="https://www.example.com/events/">Events</a>
| <a href="https://www.example.com/features">Features</a> | <a href="https://www.example.com/search.html">Search</a>
| <a href="http://www.cafepress.com/myexample" target="_blank">Hoo-Ya Shop</a>
</span></table> <div style="display: flex; justify-content: space-between;">
<a href="https://www.example.com/ubbthreads/"><img src="https://www.example.com/ubbthreads/images/bbtitle_2020.jpg" width="450" border="0" alt="The example.com Forums"/></a>
<span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-weight:bold;font-size:10pt; padding-top: 3.5em;">
<a href="https://www.example.com/">Home</a> | <a href="https://www.example.com/faq">FAQ</a>
| <a href="https://www.example.com/ubbthreads/">Forum</a>
| <a href="https://www.example.com/ubbthreads/ubbthreads.php?ubb=cfrm&c=3">Swap
Meet</a> | <a href="https://www.example.com/gallery">Gallery</a> |
<a href="https://www.example.com/techtips/">Tech Tips</a> | <a href="https://www.example.com/events/">Events</a>
| <a href="https://www.example.com/features">Features</a> | <a href="https://www.example.com/search.html">Search</a>
| <a href="http://www.cafepress.com/myexample" target="_blank">Hoo-Ya Shop</a>
</span>
</div> <a href="https://www.example.com/ubbthreads/"><img src="https://www.example.com/ubbthreads/images/bbtitle_2020.jpg" style="max-width: 25vw; height: auto;" alt="The example.com Forums"/></a>That seems to work fairly well, but on an iPhone 5 (viewed here: https://bluetree.ai/screenfly/ )the image is squished up in the left top corner and the menu consumes most of the screen. display: flex; flex-basis: 6vh; display: flex; justify-content: center; align-items: center; [edited by: not2easy at 3:26 pm (utc) on Jul 11, 2022]
[edit reason] see Charter [/edit]
img { max-width: 100%; } style="max-width: 25vw; height: auto;"Fortunately you don't need to do this; inline styling should be considered a last resort. Put it in the general css and if necessary it will override the image's individual height and width specifications (which should always be present).
<div style="display: flex; justify-content: space-between;">
<a href="https://www.example.com/ubbthreads/"><img src="https://www.example.com/ubbthreads/images/bbtitle_2020.jpg" style="width: 29vw; height: auto;" alt="The example.com Forums"/></a>
<span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-weight:bold;font-size:10pt; padding-top: 5.7vh;"
<a href="https://www.example.com/">Home</a> | <a href="https://www.example.com/faq">FAQ</a>
| <a href="https://www.example.com/ubbthreads/">Forum</a>
| <a href="https://www.example.com/ubbthreads/ubbthreads.php?ubb=cfrm&c=3">Swap
Meet</a> | <a href="https://www.example.com/gallery">Gallery</a> |
<a href="https://www.example.com/techtips/">Tech Tips</a> | <a href="https://www.example.com/events/">Events</a>
| <a href="https://www.example.com/features">Features</a> | <a href="https://www.example.com/search.html">Search</a>
| <a href="http://www.cafepress.com/myexample" target="_blank">Hoo-Ya Shop</a>
</span>
</div> <div style="display: flex; justify-content: space-between;">
<span style="max-width: 450px; margin: auto; margin-left: 0; display: block;"><a href="https://www.example.com/ubbthreads/"><img src="https://www.example.com/ubbthreads/images/bbtitle_2020.jpg" style="max-width: 100%; height="auto;" alt="The example.com Forums"/></a></span>
<span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-weight:bold;font-size:10pt; margin: auto; display: block;"
<a href="https://www.example.com/">Home</a> | <a href="https://www.example.com/faq">FAQ</a>
| <a href="https://www.example.com/ubbthreads/">Forum</a>
| <a href="https://www.example.com/ubbthreads/ubbthreads.php?ubb=cfrm&c=3">Swap
Meet</a> | <a href="https://www.example.com/gallery">Gallery</a> |
<a href="https://www.example.com/techtips/">Tech Tips</a> | <a href="https://www.example.com/events/">Events</a>
| <a href="https://www.example.com/features">Features</a> | <a href="https://www.example.com/search.html">Search</a>
| <a href="http://www.cafepress.com/myexample" target="_blank">Hoo-Ya Shop</a>
</span>
</div> margin: auto; display: block;centers the menu and the image on the screen. Then margin-left: 0; moves the image to the left edge, which is what I wanted. So now, on a small device, the image stays in the center of the block on the left edge, and the menu collapses vertically to fit the window but still looks decent and is usable. And the image resizes to fit the viewport.
Might have been a typo in this part:
Yeah, max-width defiitely isn't supposed to do that. Is it possible you had a brain fart and typed either "min-width" or simply "width" by mistake?
max-width: 100%; height: auto; is the solution (in general) for responsive images.