Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Article Writing
  4. How to center tables in articles?

How to center tables in articles?

Scheduled Pinned Locked Moved Article Writing
tutorialhtmlquestion
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Graham Wilson
    wrote on last edited by
    #1

    It would appear that the old method of centering a table on the page: <table align="center"> no longer works. How does one center a table? Maybe there should be a short HTML guide on using tables in CodeProject articles, useful for us old timers who learned HTML when Netscape was the #1 browser...

    C A 2 Replies Last reply
    0
    • G Graham Wilson

      It would appear that the old method of centering a table on the page: <table align="center"> no longer works. How does one center a table? Maybe there should be a short HTML guide on using tables in CodeProject articles, useful for us old timers who learned HTML when Netscape was the #1 browser...

      C Offline
      C Offline
      Chris Maunder
      wrote on last edited by
      #2

      Two ways. Old school

      <center><table...></table></center>

      or using standards

      <table style="margin:0 auto"> ... </table>

      eg

      Table Cell

      or for full cross browser support

      <div style="text-align:center"><table style="margin:0 auto;text-align:left"> ... </table></div>

      Table Cell

      Richard DeemingR 1 Reply Last reply
      0
      • C Chris Maunder

        Two ways. Old school

        <center><table...></table></center>

        or using standards

        <table style="margin:0 auto"> ... </table>

        eg

        Table Cell

        or for full cross browser support

        <div style="text-align:center"><table style="margin:0 auto;text-align:left"> ... </table></div>

        Table Cell

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        Chris Maunder wrote:

        Two ways. (Lists three ways.)

        Our chief weapon is surprise... surprise and fear... fear and surprise.... our two weapons are fear and surprise... and ruthless efficiency.... Our three weapons are fear, surprise, and ruthless efficiency... and an almost fanatical devotion to the Pope.... Our four... no... amongst our weapons.... amongst our weaponry... are such elements as fear, surprise.... I'll come in again. ;P https://www.youtube.com/watch?v=vt0Y39eMvpI[^]


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        C 1 Reply Last reply
        0
        • Richard DeemingR Richard Deeming

          Chris Maunder wrote:

          Two ways. (Lists three ways.)

          Our chief weapon is surprise... surprise and fear... fear and surprise.... our two weapons are fear and surprise... and ruthless efficiency.... Our three weapons are fear, surprise, and ruthless efficiency... and an almost fanatical devotion to the Pope.... Our four... no... amongst our weapons.... amongst our weaponry... are such elements as fear, surprise.... I'll come in again. ;P https://www.youtube.com/watch?v=vt0Y39eMvpI[^]


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          C Offline
          C Offline
          Chris Maunder
          wrote on last edited by
          #4

          Nooooobody expects the Spanish Inquisition!

          P 1 Reply Last reply
          0
          • C Chris Maunder

            Nooooobody expects the Spanish Inquisition!

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            Now, old lady - you have one last chance. Confess the heinous sin of heresy. Reject the works of the ungodly. Two last chances and you shall be free. Three last chances. You have three last chances, the nature of which I have divulged in my previous utterance.

            1 Reply Last reply
            0
            • G Graham Wilson

              It would appear that the old method of centering a table on the page: <table align="center"> no longer works. How does one center a table? Maybe there should be a short HTML guide on using tables in CodeProject articles, useful for us old timers who learned HTML when Netscape was the #1 browser...

              A Offline
              A Offline
              ayesha_jain
              wrote on last edited by
              #6

              try this

              for beginning tag and

              for end tag

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups