I am encountering an issue with my dynamically generated hero banner. The issue arises when the body text of the banner is longer than usual, causing it to run behind the action cards positioned at the bottom of the banner.
Here is a visual representation of the problem:
https://i.sstatic.net/9i5h4.jpg
I have tried adjusting the margin-bottom for the HeroText element, but it did not solve the issue. I am attempting to modify the CardRow and HeroText elements so that the CardRow adjusts its position based on the length of the text while still overlapping the HeroImage at the bottom. However, I am struggling to find a solution for this.
Please refer to the following CodeSandbox link for reference:
https://codesandbox.io/s/wonderful-wright-tmgnu?fontsize=14&hidenavigation=1&theme=dark
Additionally, here is all of my code:
(insert modified code here)
EDIT
I attempted to remove the negative margin property and added position: relative
, but it resulted in losing the desired overlay effect of the card row at the bottom:
https://i.sstatic.net/CPd4e.jpg