Sep 7, 2022 5:14 PM
Hello,
I believe this code is making my text column-wise and I am unable to make it center aligned
<div class="grid__col grid__col--1of2">.
Can someone help with what code I should use the make the text center aligned?
PS. I have limited coding skills 🙂
Sep 8, 2022 10:28 AM
There are horizontal spacer modules you can put to the left and right to reduce the width and center your content. Or you can use css and give it a maximum width and center it with auto margin, but sounds like you want to avoid code.
Sep 8, 2022 1:37 AM
Hi @NisantaSahoo,
if you want to center the text in the column. You can:
like this
<div class="grid__col grid__col--1of2" style="text-align:center">
to it. It will work, but I don't recommend inline-styling
like this
module/template(or where ever this div is)
<div class="grid__col grid__col--1of2 text-centered">
Your main CSS file:
.text-centered{
text-align:center;
}
This will give you more control over media queries(responsiveness).
best,
Anton
Sep 8, 2022 2:02 AM
Hi Anton,
Thanks a lot for the response, but I do not want the text to be centered inside the column. That's not my purpose, I want it to be center aligned on the page. Please take a look at the design layout
Sep 8, 2022 3:50 AM
Sep 8, 2022 4:49 AM
I didn't get you, the page is not published yet