Sean Brunnock
Centering a table
Mon May 14, 2007 11:56
70.126.130.89 (XFF: 80.1.204.114)

This really bugs me about style sheets. To center a container, you're supposed set the left and right margins to "auto". It doesn't work with all browsers.

  • style for formatting <table>Klaus Beck, Mon May 14 10:43
    I am editing my website www.naiyang.com. For a uniform design of all pages I try to use styles and stylesheets. I do not find the style-declaration for positioning a table in the horizontal middle of ... more
    • centering a tablejose puga, Tue May 15 08:27
      Did you try TABLE{margin:--}; ? If you put de same number de margin is equal,at left,at right,to the top and to bottom ... Or use only TABLE{margin-left:--;margin-right:--} (same number to center )
      • Re: centering a tableAnonymous, Tue May 15 10:19
        Thanks, Jose, for caring about me. <table style="padding: 3px; background-color: rgb(1,168, 158); width: 96%; margin-left: 2%; margin-right: 2%;"> works properly and it makes sens. I have another... more
        • font-sizejose puga, Wed May 16 11:15
          I had gone to NVU.Open the editor. If you go to FORMAT you can see a list with sizes for the font. Make the download of NVU if you have have not it. It's free!
        • souce sizejose puga, Wed May 16 05:06
          I think NVU can do that,however I only think: I always define the sizes at the style. I do not define the style inside but between <head> and </head> or in a external sheet. It's easier.... more
    • Centering a table — Sean Brunnock, Mon May 14 11:56
      • Re: Centering a tableAnonymous, Mon May 14 12:15
        Thanks, Sean, for answering immediately. "auto" does not work, but [width:96%; margin-left:2%; margin-right:2%;] works. Best regards, and have a look to www.naiyang.com for nice holidays at Phuket... more
Click here to receive daily updates