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

17th January, 2026

Redesign vs Refresh

13th December, 2025

Festive Colour Palette

9th November, 2025

Client Feedback Matters

Recent Posts

10th January, 2026

SEO Predictions 2026

5th January, 2026

Happy New Year!

3rd November, 2025

Countdown to Christmas