Guest Posted April 22, 2015 Share Posted April 22, 2015 I am using a markup block to create some text content with different formatting than the typography styles I am currently using in the style editor. Everything I have set in the custom CSS menu is correctly targeting the markup block text, aside from the 'text-align' property. No matter the setting, the text remains left justified. I would like it to be centered justified, however. Below is the CSS I am using: scenario { font-style: normal; text-align: left; font-weight: 300; font-size: 20px; line-height: 1.8em; color: #2e4259; } Any thoughts on why this text refuses to center align would be greatly appreciated! Link to comment
kale Posted April 22, 2015 Share Posted April 22, 2015 Have you tried adding !important to the declaration? Like this: text-align: center !important; Otherwise, if that doesn't work, can you post a link to said markup block? Link to comment
Guest Posted April 22, 2015 Share Posted April 22, 2015 Hi @kale, thanks for helping out! I just tried adding that declaration but it had no effect on the alignment. Here is a link to the page with the stubborn markup blocks: https://stephanie-calabrese-8bes.squarespace.com/config#/|/browse-replays Any thoughts? Link to comment
kale Posted April 22, 2015 Share Posted April 22, 2015 I don't think you are setting up these blocks correctly. You need to use div id's or classes and then place your content within those, something like this: You'd add a 'Markup Block' and then add this HTML: <div class="scenario"> <p>Here is some paragraph content</p> <ul> <li>Here is an unordered list item</li> <li>and another<li> </ul> </div> And then your custom CSS would be: .scenario { font-style: normal; text-align: left; font-weight: 300; font-size: 20px; line-height: 1.8em; color: #2e4259; text-align: center; } Try changing your HTML / CSS to that and see if it helps. Link to comment
Guest Posted April 22, 2015 Share Posted April 22, 2015 @kale, that saved the day! Indeed, my HTML in the markup block was just . Your answer here helped answer several other questions of mine about using the markdown blocks. Thanks again for helping out! Link to comment
Guest Posted June 10, 2015 Share Posted June 10, 2015 @kale Hi My Markdown block currently contains the following HTML, how can I adapt it to centre align? Or, give us a call on +233 (0)30 277 2234 Ideally I would also like to use an RGB colour code instead of the standard blue which it is right now thanks! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.