How to Centre a DIV Block Using CSS (www.imagination.gs)

(I will assume in this article that you have some basic
This article discusses how to centre (or "center" inknowledge of how to write HTML and CSS.
US English) a DIV block, whether it contains text,If you don't even have a website yet, and have
graphics, or a mixture of both, usingarrived at this article looking for tips on designing one,
standards-compliant Cascading Style Sheets (CSS).please start with my article on How to Start/Create
The technique is useful not just for creating pleasingYour Own Website instead.
designs, but also for times when you want to createSteps to Centering a DIV Block without Centering
a fixed width single column layout with the mainthe Text Inside
content placed in the centre of the page, and notLet's assume that you have a div block as follows:
flushed to one side.This is a DIV block that is to be centred. I don'twant
Assumptionsthe text to be centred, though, just the block.