Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table will not go in the centre 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi all,

I have put a table with text in it on my web site but when
viewed at different resolutions the table go's off the left and does not stay in the centre.
THANKS IN ADAVANCE.
 
Here is an ideal way to center tables regardless of screen resolution:
Code:
<div align=&quot;center&quot;>
  <center>
  <table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;5&quot;>
    <tr>
      <td width=&quot;100%&quot;>test goes here</td>
    </tr>
  </table>
  </center>
</div>
» » » » » »
Mike Barone
FREE and Pro CGI/Perl Scripts

FREE Scripts
 
Hi there m8,

Thnks for the reply but were do i put this.
I am realy new to all this!!!
 
No problem, we were all new once :)

Actually the code you see is a result of an action you can perform within FrontPage 2000.

After creating your table, right-click anywhere in the table and select Table Properties from the popup menu.

At the very top you will see Alignment dropdown menu. Choose Center from that menu and the result will be what I showed in the other response.

Hope this helps.

» » » » » »
Mike Barone
FREE and Pro CGI/Perl Scripts

FREE Scripts
 
Hi again,

i have tried what you told me to do but the table is still not centre when i load the web site at different resolutions.
Any other thing to try???
 
I used to run into this often. I even had times when going into the properties of the table wouldn't work. What I do now, which always works is the following;

In normal mode, place your cursor in the first cell of the table,
Go to HTML mode, the cursor should still be at the begining of the table, and you should see the following above, but close to your cursor:
<table border=&quot;0&quot; cellpadding=&quot;4&quot; cellspacing=&quot;3&quot; width=&quot;592&quot;>

Add align=&quot;center&quot; right after the word table, so it looks like this:

<table align=&quot;center&quot; border=&quot;0&quot; cellpadding=&quot;4&quot; cellspacing=&quot;3&quot; width=&quot;592&quot;>

Linda Adams helped me with another problem I had with aligning text and graphics, in which tables are used. That solved a number of my problems, and I am using tables a lot more now than ever with great results. The centering issue comes up almost every time, and adding the align command always works.

Jon Holmen
 
Gort,
Your little tip about using FP in normal mode, and then placing your cursor in the first cell of the table, and finally going to the HTML mode is an incredible tip. I use it all the time but not just for tables.

I have also found that with large pages, it isn't always easy to find the curser in HTML mode. To solve that I use the up and down arrows which will bring the curser right into view once you switch to the HTML mode. Great way to fine tune a problem page.
 
I have found that highlighting a word or phrase in Normal Mode, then switching to HTML mode also makes it easier to find. It usually works regardless of whether you are using tables or not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top