Centering a Web Page

M

Muster26

I can't take credit for this - not sure where I found it, but it works.

Do this:

1. Publish your website so that you have an HTML copy on your hard drive.

2. Open "index.html" in a HTML editor, or at the worst, Notepad

3. Scroll down until you see the <body> tag

4. Underneath the <body> tag, enter (copy and paste will work) this code:

<table border="0" cellpadding="0" cellspacing="2" width="768" align="center">
<tr>
<td>

(you may need to play with the width dimension)

5. Scroll all the way to the bottom until you see the </body> tag.

6. ABOVE the </body> tag, enter the following:

</td>
</tr>
</table>

After changing make sure to save the modified index.html file. Refresh or
reopen the webpage. Your content on that page should now be centered. Repeat
with other pages in the website that you want centered.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top