My website layout is relatively straightforward. It consists of a header at the top, a navigation bar with an image inside a column on the left, and the main content displayed on the right side. https://i.stack.imgur.com/yYzaG.png
For mobile responsive viewing, I am looking to have the navigation column show both the navigation list and an image side by side, instead of stacking them vertically as in the default view.
https://i.stack.imgur.com/tcM1n.png
Currently, this is the code I have been using:
<div class="row">
<div class="col-lg-2">
<div class="row">
<div class="col-sm-10">
<ul style="margin-left: 50px;">
<li><a href="/news">News</a></li>
<li><a href="/events">Events</a></li>
</ul>
</div>
<div class="col-sm10">
<img src="/images/navbg.png" class="img-fluid">
</div>
</div>
</div>
<div class="col-lg-9">
<h3>Blog Title</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit...</p>
</div>
</div>
While the layout displays correctly in the default view, the smaller responsive view causes the image and unordered list to stack vertically rather than side-by-side, taking up more space. Additionally, I would like to crop the image from the top using CSS or consider using a smaller image size.
Any assistance on resolving these issues would be greatly appreciated.