You are here:  » Aligning the content


Aligning the content

Submitted by sji2671 on Tue, 2006-03-28 15:13 in

Could someone please advise me how to align all the content inside a table or div so that all the content is aligned in the middle with a 770 width?

I have tried several files/attempts but can only get some of it to work.

Submitted by support on Tue, 2006-03-28 15:47

Hi,

I think the "standard" way to do this is by setting a width, together with margin: auto. Try making the body section of your CSS something like this:

body {
  font-family: tahoma,helvetica,sans-serif;
  font-size: small;
  color: #333;
  width:770px;
  margin:0px auto;
}

Hope this helps...!

Submitted by support on Tue, 2006-03-28 15:48

Some more info on this page:

http://www.bluerobot.com/web/css/center1.html

Submitted by sji2671 on Tue, 2006-03-28 15:50

You've only gone and solved it!

Thank you!