Tagged: x
-
AuthorPosts
-
November 8, 2016 at 11:49 am #1248999
What code is required to remove the default padding at the bottom of standard Text (the Text Element).
I only want to do this on specific pages and only on specific parts of the page… so I need to do it by Class, if possible. I’m happy to put the code in the global Customiser though.
I don’t want to remove all paragraph padding, obviously… hence only wanting to apply it to specific (Text) Elements.
My ultimate aim is to centralise the text perfectly within a section (the equivalent of using the “man” class on Custom Headlines), so the height (of the Section) above and below the body of text is exactly the same. I often use float:none;display:inline-block;vertical-align:middle; if I’m using more than one column with various Elements I want sitting perfectly central within a row. Text is the only thing that currently mucks it up.
November 8, 2016 at 11:59 am #1249011Hi There,
Please add the following CSS:
.x-text p { margin-bottom: 0; }
Hope it helps 🙂
November 8, 2016 at 12:09 pm #1249027Think I’ve found it/worked it out…
Gave the Text Element a class of no-pad, then added this to the page’s Custom CSS:
.no-pad p:last-child {
margin-bottom: 0;
}Is that the best solution?
I presume I can take out the :last-child part (see below) if I don’t mind it affecting the rest of the gaps between paragraphs, right?
.no-pad p {
margin-bottom: 0;
}November 8, 2016 at 2:21 pm #1249175Hi There,
Yes, that looks correct.
Let us know if you need further help,
Joao
-
AuthorPosts