Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 90168

Re: How to center an absolute positioned responsive div

$
0
0

I figured it out. My div takes up 75% of the width of the viewport. That leaves 25% of the viewport width remaining. So 25/2= 12.5. For me to get 12.5% of empty viewport on each side of my div, I need to set either left or right to 12.5%. Not both. I went with the right. Worked perfectly.

 

#HomeBoxWrapper{

    width: 75%;

    position:absolute;

    bottom:60px;

    right:12.5%;

    z-index:10;

}


Viewing all articles
Browse latest Browse all 90168

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>