This is for those who knows CSS.
As you know you can set specific element in the center of it's parent using "margin: auto;".
Using CSS position property.
With this property you can set your element without affecting the others.
Im going to show you how to set the element in the center verticaly and horizontaly. To do that you need to use also the margin: auto; property.
We simply add :
- if we want to set it centered horizontaly we do that:
Now when you resize the page it wil be always at the center.
- You can also set vertical center alignment by doing this :
- Or set centered alignment for horizonal and vertical :
Now no matter what you resize, the heigth or the width of the page the element will be always at the center of the page.