New guy over here. I've searched and have found similar issues but not exactly what I am after.
I simply want to know how to horizontally centre an image within a div, but also position the image at the bottom of the div (20px or so from the bottom to be precise).
I can kind of get the look I'm after by setting the container div as position:relative
, and the image position:absolute
, with bottom:30px
and margin-left: 49%
. I would just rather it be exact, rather than using left margin. The container needs to be relative for other elements I have on the page.
Any help will be greatly appreciated. Thanks.