I am sorry if this was asked before I return somewhere, there should be an answer for this, but for one reason or another I cannot find it, perhaps using the wrong search query
I know that you can use media queries to target different devices:
@media only screen and (max-device-width: 480px) {
div#wrapper {
width: 400px;
}
}
But I would like to know how to change the design of websites based on the device on which it is viewed?
Example
Suppose my normal site structure is as follows:
if the desktop
<div id="user">
<div id="profilePic">
<img src="images/responSiveTest/ppic.PNG" class="p-img" />
</div>
<div id="uname">
<h4 style="color:white">Welcome Guest</h4>
<p style="color:white">Please Log in</p>
</div>
</div>
Now, when a user browses my site on a mobile device, how can I change my layout div/ site, let's say something similar to this
if mobile device
<div id="mobileNav">
<div id="namePic">
</div>
</div>
Hope they make sense, thanks to everyone on this amazing site that helps