I know vertical-align works great on one line of text, but I can’t get this script to vertically (and horizontally) center two lines of text. What do I need to do change without changing the size of the div?
You would need display:table-cell and vertical-align:middle but you can’t float a table-cell. therefore you would be better turning the h1 into a table-cell instead and do this.
By making the h1 a table-cell the browser constructs an anonymous display:table element around it which leaves you free to float the parent div. You can’t float table-cells so the only way to do it was from the inside out.