Jump to content

Recommended Posts

Posted

Hi,

  I am using ckeditor. When i am uploading an image and giving it image align center alignment, image looks centered in body area in backend. But on front end image aligns on left side only.

Regards,

Pravin

Posted (edited)

CKEditor image styles in Processwire are set via a CSS class for frontent:

class="align_center"
class="align_left"
class="align_right"

so you have to setup some styles into your template CSS to fit your needs like for eg.:

.align_left {float:left;margin: 5px;}
.align_right{float:right;margin: 5px;}
.align_center{margin: 0px auto; display:block;}

Best regards mr-fan
 

@Martijn

"clipbord" talk to me  - don't forget to editing me after copy and paste me....;)

Edited by mr-fan
  • Like 5
Posted

mr-fan, you forgot the .align_center  :)

.align_center {
    margin: 0 auto;
    display: block;
}

HI Martijn Geerts,

  Thanx for help. It worked for me.  Does this means that  class  "align_center"  is default class, we just have to write style for it?

Regards

Pravin

Posted

Yes,

you could set the preferred class names here: /processwire/module/edit?name=ProcessPageEditImageSelect 

Thanx a ton.

Regards,

Pravin

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...