Align a table to the right with CSS

C

Cristian

Hello, I wanted to know if it is possible to align a table to the
right with CSS?
I use "margin-left: auto; margin-right: auto;" to center tables, but I
don't know how can I change those parameters to make it go to the
right.

Thank you for your help!
 
S

Safalra (Stephen Morley)

Hello, I wanted to know if it is possible to align a table to the
right with CSS?
I use "margin-left: auto; margin-right: auto;" to center tables, but I
don't know how can I change those parameters to make it go to the
right.


Just use margin-left:auto (and make sure it's not having margin-right set
to auto by another less specific rule). If you want the content to flow
around it, you can use float:right.
 
C

Cristian

Just use margin-left:auto (and make sure it's not having margin-right set
to auto by another less specific rule). If you want the content to flow
around it, you can use float:right.

Thank you so much!
I added this "margin-left: auto; margin-right: 0px;" and the table
went to the right, just the way I wanted.

Bye!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top