Do not include code that is only needed for larger viewports and hide it at smaller widths. Think about how the source order of the markup would work if you didn't have CSS or JS.
When building a page, start by creating the lightest and most semantic HTML possible. We recommend following a "mobile-first" approach to keep development focused on reducing bandwidth, server requests and optimizing source order. When working with RWD, it's very important to consider performance to ensure that you're not simply taking a heavy desktop site and shrinking it down to mobile screens. This provides a solid foundation for the device-level optimizations that RWD provides and is how the jQuery Mobile library is built. This means always starting with semantic HTML which will work on any device, then unobtrusively layering in advanced CSS and JS only for capable browsers. In addition to these three core RWD principles, we advocate following progressive enhancement (PE) practices. Since the content inside each container is designed to re-flow to fit its parent, the media queries can focus just on the rules for making the columns stack or float, and to override or add styles only needed at greater widths. At greater widths, media queries are used to float both containers to create a two column layout to take better advantage of the wider screen.
Flexible images and media, are also sized in relative units so they re-size to fit within their containers.īy creating all screen elements to be fluid and flexible, it allows the media queries to focus primarily on controlling layout rules for containers the modules inside simply re-size to fit their containers.Ī simple responsive example may be two stacked containers, each with flexible content or widgets inside.
A fluid grid, that specifies elements and widgets in flexible units with the goal of making them flow to fill their containers.CSS media queries, used to target styles to specific device characteristics such as screen width breakpoint or resolution.The framework has a number of responsive widgets: responsive grids, reflow tables and column chooser tables, and panels. Responsive web design (RWD) is a design and technical approach that aims to adapt the layout and interaction of a site or app to work optimally across a wide range of device resolutions, screen densities and interaction modes with the same underlying codebase.