Kako sakriti/prikazati div element za mobitele i desktop

Ovako, imam četiri div elementa koje želim prikazati na stranici, ali tako da se prvi i drugi pokazuju samo na desktopu, odnosno na širim ekranima, a druga dva samo na mobilnim uređajima. Pokušao sam ovako, ali nejde:

#my-content1 {
	max-width: 450px;
	min-height: 100px; float: left;

}
#my-content2 {
	max-width: 250px;
	min-height: 300px; float: right;
}
#my-content3 {
	max-width: auto;
	min-height: 100px; float: left;

}
#my-content4 {
	max-width: auto;
	min-height: 250px; float: right;
}

@media screen and (min-width: 0px) and (max-width: 760px) {
  #my-content1, #my-content2 { display: none; }
 #my-content3, #my-content4 { display: block; }

}

@media screen and (min-width: 761px) and (max-width: 1200px) {
  #my-content1, #my-content2 { display: block; }
 #my-content3, #my-content4 { display: none; }
}

Može li mi netko pomoći?

    <!doctype html>
<html>
    <head>
       <title>Responsive test</title>
        <style>
            .mobile { display: none; }
            
            @media screen and (max-width: 768px) {
                .desktop { display: none; }
                .mobile { display: block; }
            }
        </style>
    </head>
    <body>
        <div class="desktop">
            Desktop visible, mobile hidden
        </div>
        <div class="desktop">
            Desktop visible, mobile hidden
        </div>
        <div class="mobile">
            Mobile visible, desktop hidden
        </div>
        <div class="mobile">
            Mobile visible, desktop hidden
        </div>
        
    </body>
</html>

Evo ga.

@creatifcode puno ti hvala


Copyright © 2020 WM Forum - AboutContact - Sponsored by: Mydataknox & Profit Monkey