TOC div has inline set height
See original GitHub issueI am working on a customization of the template for only single-page use-case as described in #949. I was fairly successful: https://gist.github.com/AuHau/29c520a24f719ca95fed22baa6b8ae26
A problem I run into when I was tweaking the responsivity of the site is that the TOC div (.md-sidebar--secondary) is being set a fixed height using inline CSS for one of the width range (1024px), which makes it impossible to override as I need to achieve 100% height for the “drive out menu”.
What is the reason for this behavior? Where does it originate? Is it possible to find a better solution that would not require fixed height? Maybe using CSS’s calc?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
height style property doesn't work in div elements
You cannot set height and width for elements with display:inline; . ... You try to set the height property of an inline element,...
Read more >Inline CSS Guide - How to use Inline Styles | Simplilearn
Inline CSS is the technique to define the single element with the insert style sheets in an HTML document. Understand various concepts of ......
Read more >A Perfect Table of Contents With HTML + CSS
A table of contents is easy to generate in word processing tools, but trickier to pull off in plain HTML and CSS. But...
Read more >Setting Height And Width On Images Is Important Again
To prevent layout shifts and improve performance scores, we need to always set width and height attributes on our images.
Read more >Min and Max Width/Height in CSS - Ahmad Shadeed
Setting Min Width to Zero With Flexbox ... The default value for min-width is auto , which is computed to zero. When an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ups, you are right, my brain was still sleeping when I was validating my claim 😅
Ok, I guess that is an alright solution for me.
Thanks for the answers!
!importantwill override inline styles, as those declarations have priority over non-important rules. See the CSS2 specification, section 6.4 for a detailed explanation.