CSS how to center table [closed]

Tags: css,table,center

Problem :

I'm finishing set up a WordPress site to my client but I am facing a little issue ion contact page.

I cannot center the table with phone number and email...


I tried with margin:auto; text-align : center on table selector but It never moves from left to center during my test in Chrome inspector...

Any idea to help me ?

Below picture shows how it looks actually. I would like the numbers and mail to be centered

enter image description here

Solution :

You could have this result adding text-align: center on the parent table and then display: inline-block in the tbody.

enter image description here

Keep in mind that text-align will apply aligning of the inline and inline-block displayed elements.

    CSS Howto..

    How to set css style to asp.net button?

    How to run multiple css selector classes at once?

    how can we use and control Gradient

    How to increase width of image when dimensions are not known in CSS?

    How to get at Apache Wicket PropertyColumn data to dynamically change CSS class based on content?

    How to get rid of the bottom shadow in label of the css tabs

    Using only CSS, show div on hover over

    How can I scale element height and width using CSS?

    how to convert list item to slider when browser is less than 640px?

    How to setup counters for target-counters

    How to remove/reset/not inherit the CSS properties of a DIV/element/… within the same CSS document?

    How to prevent mouseenter event action with jQuery

    How to get 3 div's side by side under an angle

    How to locate which css include is used for an element

    How to decrease CSS opacity

    Images not showing in PhoneGap Build application

    How to access parent element in CSS? [duplicate]

    Multiple DIVs, same Classes, how to reduce css markups?

    How to use Javascript to get a visitors monitor resolution?

    how to not inherit? or how to reset inherited width to the value before? (css)

    How to style this triangle on a circular image?

    How to replicate this table layout in HTML4/CSS2 (incl. vert-centered rows)

    How to print labels from a label printer using html

    how to do external scripting?

    How to make multiple left columns fixed and scroll the the rest columns in HTML table?

    How to layer a
    element ontop of a other elements

    css: how to surround an image with two other images vertically centered around the first one?

    How to apply css class to uploaded image? [closed]

    show/hide div on click

    Rails - how to build a grid-like list of product page