I have HTML structure that looks like this:
<div class="c-wrapper c-sidebar-fixed">
<div class="c-sidebar">
Side Bar Menu
</div>
</div>
The current CSS code was designed when the side bar div was outside of the c-wrapper. Now I moved the sidebar inside of wrapper. How this CSS can be adjusted to work with the current html structure?
@media (min-width: 992px) {
html:not([dir="rtl"]) .c-sidebar.c-sidebar-fixed ~ .c-wrapper {
margin-left: 256px;
}
*[dir="rtl"] .c-sidebar.c-sidebar-fixed ~ .c-wrapper {
margin-right: 256px;
}
}
I'm not sure what is the most efficient way to select the parent element c-wrapper
. If you have any suggestions please let me know.