Why inner elements of outer Div did not inherit background-color? Then i had to use class 'cardColor' in every element to work, thanks
Waleed Alfaifi
@waleed-alfaifiAll comments
- @MatistikSubmitted about 2 years ago@waleed-alfaifiPosted about 2 years ago
Because you have a universal selector
* { ... }
that sets the propertybackground-color
for all elements. Check the Elements tabCtrl+Shift+i
of the browser for debugging.Also check the centering issue, other than that everything is good.
Good luck with your learning journey.
0 - @solybarrSubmitted over 4 years ago
Hi I'm a little disappointed by this one, it was harder than I thought. I had trouble with the relative/absolute positioning of the Call to action that overlaps the footer. I couldn't center it the normal way with margin 0 auto because of the positioning. I couldn't size it correctly either. Thanks for any help.
@waleed-alfaifiPosted over 4 years agoYou can use
position: relative
instead ofposition: absolute
and use negativemargin-bottom
to move the CTA down. When you useposition: relative
you can usemargin: 0 auto
to center the CTA. Just make sure you set amax-width
to be able to center it.0