Aside from resizing text and images, media queries are frequently employed in responsive web design.
Media queries enable the specification of distinct styles for various browser sizes.
For instance, adjust the browser window size to observe that the three div elements below will arrange horizontally on larger screens and stack vertically on smaller screens.
Example
<style> .left, .right { float: left; width: 20%; /* The width is 20%, by default */ } .main { /* Use a media query to add a breakpoint at 800px: */ |