Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Sign in to follow this  
kateco

How do I center the text from my HTML code in Markdown?

Question

I am trying to create a header featuring four links to reference points below on a page in my website. I've gotten the words appropriately spaced and I now only need to center the four words. I've attached a screenshot of my conundrum as my site is not yet live. I'd like the top four words (the HTML references) to match the bottom four words (just plain old text that is centered) Any help is appreciated!alt text

Edited by kateco

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0

Your site has a url which you will find in Settings > Domains > Built-In Domain. Post that url here.


I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Share this post


Link to post
  • 3

There is, though, a way in Markdown to center text but it involves a little elementary HTML. One surrounds the text to be centered with a div having these attributes: style="text-align: center;" markdown="1".

Thus:

<div style="text-align: center;" markdown="1">This line is centered.  This second line too.  (for a line-break, end the prior line with two spaces)</div>This following text will be left justified by default.

Or, for example,

<h3 style="text-align: center;" markdown="1">This is a level 3 heading.</h3>

Experiment with a code block.

Some authors say, though, that CSS is the better practice. The Ghost Blogging Support Forum: Justified Text.


I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Share this post


Link to post
  • 0

This is so close to working for me! My only issue is that I want it to be the normal body copy. Any idea what the style is for that instead of h3? I tried a few things and didn't have much luck without drastically altering the spacing.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...