I have a sidebar fixed to the left of the screen.
I have the current time in a paragraph tag at the top of the sidebar. The width of this element is what sets the width of the sidebar.
What I am struggling with is then adding another paragraph to the sidebar which is centered horizontally and vertically in the sidebar.
I've looked at many other examples of centering elements but can't seem to get it. Help is much appreciated.
Basic structure:
<div id="left">
<p id="time">
12:03<span>45</span>
</p>
<p id="currentWeather">
<!-- I've replaced this <i> with an <img> to avoid loading the font in the fiddle -->
<i class="wi wi-day-sunny"></i>
<img src="http://findicons.com/files/icons/2603/weezle/256/weezle_sun.png">
<span>32</span>
</p>
</div>
Fiddle: https://jsfiddle.net/w5m7qd6u/1/