positioning table in middle of page using css

Author Topic: positioning table in middle of page using css  (Read 4891 times)

Offline WalalayoTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 3
  • Posts: 180
  • Karma: 2
    • JavaScript Editor
positioning table in middle of page using css
« on: 09-20-2011, 03:35:58 »
hi am trying to position a table in a middle of a page , so it stays in middle of page when users adjust thier screen sizes using css, and am stuck
any 1 know of any tutorials on the web where i can look

cheers for any info


Offline saravanan28

  • Trade Count: (0)
  • Sr. Member
  • ****
  • Thank You 2
  • Posts: 428
  • Karma: 0
Re: positioning table in middle of page using css
« Reply #1 on: 06-23-2021, 09:17:02 »
To center this table, you would need to add ;margin-left:auto;margin-right:auto; to the end of the style attribute in the <table> tag. The table tag would look like the following. Changing the style attribute in the <table> tag, as shown above, results in the table being centered on the web page, as shown below.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
2442 Views
Last post 05-21-2010, 11:25:27
by welshboy
0 Replies
1685 Views
Last post 10-25-2011, 00:21:27
by manvbf
0 Replies
840 Views
Last post 04-19-2016, 06:01:42
by chinmay.sahoo
0 Replies
1572 Views
Last post 11-14-2016, 03:19:21
by aarav
2 Replies
22153 Views
Last post 01-21-2021, 04:47:09
by Lishmalinyjames