Home > Net >  How do I make my sidebar height adjust to the content?
How do I make my sidebar height adjust to the content?

Time:10-30

Right now I have a sidebar that minimizes and expands along with the content beside it. This is wrapped around a main wrapper component such that I can pass any content/component.

However, if the content is too long the sidebar height will not adjust. I have tried setting the height and min-height and it didn't do anything.

Things I have tried/have thought about:

  • Faux columns however I am not sure to implement it in my use-case.
  • Make the sidebar fixed however I am not sure how will the content (children of the main wrapper) will adjust if the sidebar is minimized/expanded.

Here is what is happening right now. cut sidebar

Here is the sandbox link: Edit dazziling-code

  • Related