I am facing an issue with my CSS code where I want to apply different styles for a specific class on smaller devices compared to larger screens. My project primarily uses Bootstrap, but I have also included some custom CSS. On "normal" sized screens, I have the following CSS code for the middleDiv
class:
div.middleDiv{
max-height: 100%;
overflow: scroll;
}
For smaller devices, I would like to use the following CSS settings for the middleDiv
class:
@media screen and (max-width: 767px) {
div.middleDiv{
overflow: visible;
max-height: none;
}
}
My goal is to only show a scrollbar within the specified div when there is overflow on normal devices, such as computers. However, I want to maintain the default styles for smaller devices. It appears that I am unable to override the default settings for different devices. Can someone please assist me with this? I have also attached screenshots of the desired outcome below. Thank you.