@dotfivesix
Posted
You need to make a container and set its position relative, in that container you can have your quote div and dice div, set dice div to absolute, now you can align that dice relative to our main contianer.... What you need to do is, set it to bottom (bottom: 0;) and left : 50%; But this wouldn't solve the problem exactly, do bottom : diceHeight/2 and left : calc(50% - diceHeight/2) e.g If dice's height is 4rem and width is 4rem too, do... bottom : -2rem; left : calc(50% - 2rem) i.e 2rem is half of 4rem which is original height/width this way u can align dice on top of main container, relative to it properly. Also quote doesn't change when you click on dice, implement that if you know... Anyways goodluck !
Marked as helpful