I created a sub theme and there ist a component css

.node--view-mode-full .w3-container.node__content .field--name-body p {
text-align: justify;
}

as I like to float the content left, I added

.node--view-mode-full .w3-container.node__content .field--name-body p {
text-align: left;
}

to my sub_theme.css

when I use CK-Editor to set for example text-align-center in a node, the theme overrides the css of CK-editor.

What is the best solution for having all body contents left aligned, but the option to customize some layouts with CK-editor?

Comments

nojj created an issue. See original summary.

flashwebcenter’s picture

Title: components css more specific than CKEditor Styles » Align the content in the body field to left, right, center or to justify it with CKEditor
Status: Active » Fixed
Issue tags: +ckeditor, +body field

Hello,

Please add the below css code to your sub theme css file. sub_theme.css

.node--view-mode-full .w3-container.node__content .field--name-body p.text-align-right {
  text-align: right;
}
.node--view-mode-full .w3-container.node__content .field--name-body p.text-align-justify {
  text-align: justify;
}
.node--view-mode-full .w3-container.node__content .field--name-body p.text-align-center {
  text-align: center;
}

Best wishes,
Alaa

nojj’s picture

Thank You! works like a charm!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

flashwebcenter’s picture