How to center a div within a div | SoloLearn: Learn to code for FREE!

+1

How to center a div within a div

have a div "container" and another div "form". container size of page while form is custom size in center.

10/24/2017 4:47:05 AM

Dick Tracy

7 Answers

New Answer

+4

I found this in Code Playground, hope it provides you an insight: https://code.sololearn.com/WewcrAlN1m8k/?ref=app Hth, cmiiw

+2

that's pretty neat!! but I m looking for something more like the Google page. but a login form instead. vertical centering is where I am having trouble

+2

You could use flex box..

+1

https://code.sololearn.com/W9WnzG8sAIpq/?ref=app

+1

this is what I have so far https://code.sololearn.com/WsL5L4Z79EZ0/?ref=app

0

Can I see your prototype code, please.

0

Here my code on the go. Without examine your code, I don't how to provide a solution to your problem. https://code.sololearn.com/Wayj7S8uEd03/?ref=app