-
DescriptionSo, I am creating a website project and a footer therein using the <footer class="footer">
<div class="nav-footer">
<div class="nav-footer-left">left</div>
<div class="nav-footer-center">center</div>
<div class="nav-footer-right">right</div>
</div>
</footer> Just for the sake of it, I was fiddling with CSS and found that I am not able to set the .nav-footer-left {
height: 200%;
} However, I am able to set it via pixels. Why is it so? (I had a long look at the generated Bootsrap CSS files, but that didn't help.) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I would say pixel is an absolute unit, and % is a relative one. So 200% needs to apply on something and it could be limited too. Also know that quarto-cli/src/resources/projects/website/navigation/quarto-nav.scss Lines 763 to 775 in 167c748 So you need to understand how that works (https://css-tricks.com/snippets/css/a-guide-to-flexbox/) or remove the flex CSS Hope it helps |
Beta Was this translation helpful? Give feedback.
In addition, be aware that relatives units are to the parent element.
If the parent element has no absolute dimensions, the child element can't have relative dimensions.
Usually
body
has no height or weight.This is why Quarto defined a big div inside body, in order to be able to have relative dimensions elements in it, for example to make grids.