I am new to bootstrap coding and CSS
I am stuck in one issue where in the desktop version i need one image but when it comes to the mobile version i need the second image to be shown and first image should hide.
<div class="col-md-9" style="padding: 0px;">
<img src="images/Trinity-Garden-landing-Page-1.jpg" width="1350px" />
<img src="images/Trinity-Garden-landing-Page-4.jpg" width="1350px" />
</div>
Help needed.
You can use bootstrap responsive utilities for showing/hiding components based on the screen size.
Your code snippet has been modified as an example.
You may want to have a look at the picture element. Support is quite good now. Example:
UPDATED : Try these classes : http://getbootstrap.com/css/#responsive-utilities-classes
for the image that must only show in the desktop use :
hidden-xs hidden-sm hidden-md
for image that must show only on mobile use :
hidden-lg hidden-xl
example :
Please implement this code.
You can change max width in media query according to your need. Also please expand snippet to check hide and show image according to device. I hope it will work for you.
Use the below code, It might help you..
In that I used @media query to hide first image and display second image on mobile view.