0

I am making a Wordpress site that will have side-by-side song lyrics in English and Arabic.

Example page:

https://arabicsonglyrics.com/ahl-al-hawa-um-katlhum/

You see that the English side is left-justified and the Arabic side is right justified.I have done this manually in the Wordpress CMS by adding the right align HTML tag to each row in the html table.

Is there any way to set up site-wide CSS that will automatically right-justify the right-hand column of all tables on the site?

I have googled around this query and have not found a way to auto-right justify CSS tables but not found anything that does this.

The current code I'm using to right-justify the right column is:

<td style="text-align: right;">
willward1
  • 1
  • 1

1 Answers1

-1

You could use something like the nth css selector. You can define to only apply a css style for every n-th elementy (n = 2, -> every second element).

Visit this page for more information about this selector:

https://www.w3schools.com/cssref/sel_nth-child.asp

lucamuh
  • 1,235
  • 2
  • 8
  • 12