Client Feedback Matters

Read More

How to centre a DIV using CSS

3rd August, 2010

In our Tidy Blog we will show you how to use CSS to control the style and layout of multiple web pages! For example, if you wanted your content DIV to have a width of 700 pixels and to be centred in the browser your CSS would read:

#content {
  width: 700px;
  margin-left: auto;
  margin-right: auto;
}

The above  code works in IE 6, 7, 8, Firefox, Opera and Safari so all you now need to do is insert:

<div id=”content”>test</div>

in the body of your webpage and away you go!

Web Design Posts

10th April, 2026

Spring Colour Palette

17th January, 2026

Redesign vs Refresh

13th December, 2025

Festive Colour Palette

Recent Posts

25th February, 2026

A Few Days Away

7th February, 2026

What is an AI citation?