Jump to content

Aligning Text Center in a markdown box

Recommended Posts

Hi everyone,

I am using this coding for text in a markdown box. All of it works with the exception of, "text-align: center". Can someone please let me know how to properly get the alignment code to work? Thanks.

Unfortunately I am unable to add a link to the page this on because it is not enabled yet.


<span style="color:red; font-family:Georgia; text-align:center; font-size:2em;">The goal of the Women’s Enterprise Action Loan Fund, (WEALF): helping women business owners become financially self-sufficient.




Link to comment
  • Replies 5
  • Views 54.2k
  • Created
  • Last Reply

@sportslady180

It looks like you may have left out a closing span tag.

You're code should look like this:


<span style="color:red; font-family:Georgia; text-align:center; font-size:2em;">The goal of the Women’s Enterprise Action Loan Fund, (WEALF): helping women business owners become financially self-sufficient.</span>

Note the closing

</span>

tag

Link to comment
  • 5 weeks later...

It is because text-align:center needs a block element like a div. Try the following:


<div style="text-align:center"><span style="color:red; font-family:Georgia; font-size:2em;">The goal of the Women’s Enterprise Action Loan Fund, (WEALF): helping women business owners become financially self-sufficient.</span></div>

This is working for me, and you can see it for a while at gennick.com/test.

Link to comment
  • 2 years later...

I just added the word center in between less than sign and the greater than sign that are in between the M and the question mark on our keyboards, like in html.

I can't type the actual less than and greater than signs because they go invisible...just put the word center in between those two bad boys above ur markup text and it seems to do the trick, centers it, like html =)

Link to comment
  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.