The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › make div stick to right of page even though enclosing div is not full width
Hello, In this codepen:
I’m trying to get .module to stick to the right of the page, even though it’s inside of a div that has a max width that is smaller & is margin auto.
Basically I want the div to be stuck all the way to the right of the browser window.
Thanks so much for any help!
Yes, but it’s inside of a div that has a max width and is margin 0 auto.
I’m trying to see if there’s an elegant way to keep the rest of the page structure intact, but make the div stick to the right of the browser window.
I still want it inside of a div that has a max-width so I don’t have to do a big rewrite of the rest of the page code if that makes sense.
(Structurally it should be inside if the .wrap div in the html, but visually it should be stuck to the right of the browser window.)