align html elements horizontally in a div code example Example: how to get my div to centre .div{margin: 0 auto;}