CSS – Centre element to parent / page

Two ways to centre horizontally on your web page

using min-width and max-width. Use this when you need your element to be a fixed height from the top of the window

using absolute and width. use this when you want to be dead centre of the window

Leave a Reply

Your email address will not be published. Required fields are marked *