question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TOC div has inline set height

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
AuHaucommented, Feb 11, 2019

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!

0reactions
squidfunkcommented, Feb 11, 2019

!important will override inline styles, as those declarations have priority over non-important rules. See the CSS2 specification, section 6.4 for a detailed explanation.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found