hey i am designing a website and i want the design part to be in center of the page(ref:http://www.sacredheartschool.com/)

I saw the code they have used div tag.... but it can be done using table tag also but i am not getting it.... so plzz help me

Recommended Answers

All 2 Replies

You might be looking for this?

<table align="center">

Also, it might be good to take your time and study a html tutorial, if you are willing to make a website in html.
http://www.w3schools.com/html/DEFAULT.asp - tutorial

Use auto margin to align center for block-level elements.

table {
        margin: 0 auto;
        width: 90%
          }

Auto margin can only work when the width was set. And you must validate your HTML document. You're designing with table, so you should validate with HTML 4.01. Here is transitional mode:

<!DOCTYPE html PUBLIC "-//W3C DTD HTML 4.01 Transitional//EN" "http:www.w3.org/TR/html4/loose.dtd">

Try this and if you would not get success. please post again.. Good luck .. friend..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.