sighpcedu / sighpcedu.github.io

2 stars 2 forks source link

Center Text #6

Open colbrydi opened 2 years ago

colbrydi commented 2 years ago

I would like to figure out how to center text. We use text centering in the by-laws and, if possible, I would like it to look the same. I tried adding the following to the markdown but that did not work:

<div style="text-align: center;">

This issue and the other two initial issues are all probably related. I just need to learn the css better.

georgiastuart commented 2 years ago

Hm, that should work. I'll take a look.

As an aside, tailwind has a convenience class for this (text-center): https://tailwindcss.com/docs/text-align#setting-the-text-alignment

Just add it and rebuild the css file.

colbrydi commented 2 years ago

Looks like align-center is part of tailwindcss/typography plugin which I installed using npm install -D @tailwindcss/typography. I then added the following to my tailwind.config.js file:

plugins: [ require('@tailwindcss/typography') ]

This seemed to "work" in that it did not give me an error. However, I still can't figure out how to properly activate it... Still searching.

georgiastuart commented 2 years ago

It's part of standard tailwind, definitely.