Text Alignment - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Text Alignment

P

PC&GRAPHIC

SP Page Builder 2 years ago

Hi, I made a feature box with text . I would like to know if I have the possibility to have two different text alignments between desktop and mobile. I would like it to be aligned justified on desktop and centered on mobile. Unfortunately, if I change the alignment on one mode, it also keeps it on the other. Thank you

0
5 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #119643

Hi,

Possible, but custom CSS may be needed.

  1. First set Left align in addon settings
  2. Then use below Custom CSS for Mobile view
@media screen and (max-width: 680px) {
.sppb-addon-feature .sppb-addon-text,  .sppb-addon-feature .sppb-media-content {
  text-align: center !important;}
    }
0
P
PC&GRAPHIC
Accepted Answer
2 years ago #119648

Paul thanks for your reply. I inserted the code in the style section of the future box in custom css but it doesn't change anything. I'll explain: In the desktop part the text must be justified while in the phone mode it must be centered. If I make the change to the form it applies it for all desktop tablet and phone view types. I entered the css code putting the text set to left but it remains unchanged

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #119672

Before told about alignments it means text-align.

Now you talk about text-justify. Those are two different CSS Properties!

Which one you want to change? Decide.

0
P
PC&GRAPHIC
Accepted Answer
2 years ago #119699

Maybe I explained myself wrong...

in the future box I have a text that I would like to be aligned to the left...up to here there are no problems. the same text that is in the left-aligned feature box I would like it to be center-aligned when viewed in mobile. If I put the interface on mobile and make the change in the center accordingly, it also changes the alignment in desktop mode.

I noticed that instead with the font size it manages to manage the two things separately but as far as text alignment is concerned, no.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #119740

Ok, so if you can align to left in addon settings - do it, if not - copy and paste Custom CSS code inside that page: Page Settings > Page CSS

.sppb-addon-feature .sppb-addon-content,
.sppb-addon-feature .sppb-addon-text,  
.sppb-addon-feature .sppb-media-content 
{text-align: left !important;}

@media screen and (max-width: 680px) {
.sppb-addon-feature .sppb-addon-content,
.sppb-addon-feature .sppb-addon-text,  
.sppb-addon-feature .sppb-media-content {text-align: center !important;}
 }

info_1217_2023.jpg

yes, it works, I tested on my own website!

0