The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › changing left value of centered div
to center a div, we do trick like this,
transform: translate(-50%, -50%);
but if change the value of left or top like left: 60% or top: 40% , then it would be not so centered at all..then i’ll try to change the value in translate also to balance this..
but not working..
codepen – http://codepen.io/Phe0nix/pen/XRJaMJ
The top and left values are in relation to the parent, the transform values are in relation to the element itself. Not sure what you’re trying to achieve.