| ( | | | | I will assume in this article that you have some basic |
| This article discusses how to centre (or "center" in | | | | knowledge 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, using | | | | arrived 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 pleasing | | | | Your Own Website instead. |
| designs, but also for times when you want to create | | | | Steps to Centering a DIV Block without Centering |
| a fixed width single column layout with the main | | | | the Text Inside |
| content placed in the centre of the page, and not | | | | Let'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 |
| Assumptions | | | | the text to be centred, though, just the block. |