Skip to content

Add Right to Left (RTL) support to the Ghost CMS default Casper theme

Ahmad Ajmi Photo
Ahmad Ajmi

Today, I want to share with you how to add Right to Left (RTL) support to the Ghost CMS default Casper theme. This is useful if you are writing in a language like Arabic or Hebrew, for example, and you want your visitors to view the articles and the blog in the right direction. This is part two of the last post about Ghost Admin Right to Left (RTL) Support.

All you want to do is copy and paste the following CSS code into the Code Injection Site Header area. Then click the Save button.

<style>
  body {
    text-align: right;
    direction: rtl;
  }

  .site-nav-logo {
    margin-right: 0;
    margin-left: 32px;
  }

  .site-nav-left {
    margin-right: 0;
    margin-left: 10px;
  }

  .site-nav-left .nav li:last-of-type {
    padding-right: 0;
    padding-left: 20px;
  }

  .nav-post-title.dash {
    left: auto;
    right: -25px;
  }

  .site-nav-main .site-nav-left-wrapper:after {
    right: auto;
    left: 0;
  }

  .author-header-content {
    margin: 5px 30px 0 0;
  }

  .author-card .author-info {
    margin: 0 20px 0 0;
  }

  .subscribe-overlay button {
    margin: 0 15px 0 0;
  }

  .subscribe-form button {
    margin: 0 10px 0 0 ;
  }

  @media (min-width: 795px) {
    .post-card-large .post-card-content-link,
    .post-card-large .post-card-meta {
      padding: 0 40px 0 0;
    }
  }

  .post-card-byline-content {
    margin: 2px 6px 0 0;
  }

  .static-avatar {
    margin: 0 -6px 0 0;
  }

  .post-full-byline-content .author-list {
    padding: 0 0 0 12px;
  }

  .author-list {
    margin: 0 4px 0 0;
  }

  .post-full-content blockquote {
    border-left: 0;
    border-right: 3px solid #3eb0ef;
  }

  .site-footer-nav a {
    margin-left: 0;
    margin-right: 20px;
  }

  .site-footer-nav a:before {
    left: auto;
    right: -11px;
  }
</style>

The final result will be like

Casper Right to Left Home page

Post

Casper Right to Left Post page

About

Casper Right to Left About page

That’s it for today and I hope you find this useful…


Subscribe to Aspire Themes

You will receive Ghost resources, new themes, and updates.


Write more
Save time & money

Ghost CMS themes for a professional-looking website. Newsletter & membership full support.

Explore themes →
  • Ghost 4 Support
  • Free Support & Updates
  • 100% Money-Back Guarantee