https://jsfiddle.net/ug4u48pr/3/
I'm trying to build a simple app to put on a webpage with the intention to be accessed by mobile devices.
Because mobile devices tend to have a variety of resolutions, I figured I'd try to make the header/footer sections remain as consistent as possible by making them have heights of 20% with the body section having a height of 60%.
The problem is that I can't seem to fit the image within the constraints of the relative height of the header.
I've looked around and failed with an assortment of things such as...
img {max-height: 100%; max-width: 100%;}
img {display: block; overflow: visible/hidden;}
img {width: 100%; height: auto;}
img {height: 70px;}
The solution to my problem has to work dynamically as the window is resized.
I've managed to make the image properly scale by setting it as a "background". Before as an , it was too large/small and didn't fit the header. Now it does, but ruins the positioning of the title.
The "Application Title" should be centered vertically/horizontally with respect to the remaining width of the header, with its left edge of the cell touching the right edge of the image.
I figure there is a simple and straight forward solution, but I just can't seem to find it.