- This topic has 3 replies, 2 voices, and was last updated 5 years, 10 months ago by
Sebastian.
Author | Posts |
---|---|
andrewpeters
June 19, 2019 at 11:43 pm
|
Heads up! this post was created when Microthemer was at version 5. The current version is 7. Some references to the interface may be out of date. Hey there! I am trying to level up a bit on the CSS side. ๐ Presently I’m trying to stack two headings in a Info Box Module in Beaver Builder. I got it working on desktop, but considering how it looks on mobile I think I didn’t do it correctly? I was wondering if I could get help in understanding how to make this work correctly. Trying to learn! Just not sure where I missed it. The dev site is https://alliance.thereachco.dev. The heading I’m looking to tweak is just below the hero area, and there’s a few on the page. |
Sebastian
June 20, 2019 at 10:21 am
|
Hey Andrew, If I understand you correctly, you are trying to make the text overlap such that Life Change is in the background, and the mission heading is in front, both vertically and horizontally aligned with the background heading, which is taller and very faint. You were on the right track with using position: absolute. But using bottom and top offsets for a large screen width won’t translate well to a smaller screen width, as you discovered. What you are trying to achieve is fairly ambitious by the way, especially as CSS hasn’t been great for layout for many years (perhaps surprisingly). However, CSS grid changes that. It takes a bit of learning, and MT doesn’t have UI fields for grid yet (although they are coming in the next few months). But CSS grid is awesome once you get the hang of it. To solve your issue in a way that works on mobile too, I recommend the following CSS styles, which you can copy and paste into the editor (to the left of the Font group) – overwriting the styles that are already there. And deleting or disabling the selector you created for the Life Change heading.
Why this works
I prototyped these styles on a separate site. I think they should still work on your site, but let me know if not. Cheers! |
andrewpeters
June 20, 2019 at 6:11 pm
|
Ah! I get it. Worked like a charm. ๐ Thanks for helping me out with that and more importantly, helping me understand it! |
Sebastian
June 21, 2019 at 9:02 am
|
You’re welcome Andrew. I’m glad it makes sense ๐ |