I am creating a webpage which has 2 divs side by side inside another div. I want to have them dynamically move and align themselves vertically and centered when the web page's width is narrowed past a certain point. I can get them to move and align vertically but cannot get them centered after doing so. Any suggestions on how to do this?
Here is an image that shows what I want if my description doesn't make sense.
CSS - Dynamically move and center side by side divs
Post a Reply
|Oldest Newest Rating|
· March 6, 2015
More about Div positioning...
· October 2, 2014
Once your webpage drops into a one column layout, set the parent container of the smaller divs to position: relative and then set the small divs' margins to auto. I hope this helps also.
|+2||Samuel Oloruntoba · October 1, 2014|