sai@leapfrogstudios.in
040-40110223 / 9885555166
Basics of Responsive Web Design
To create a responsive website, we should know the below 3 main parts
1. Fluid Grid - It's a flexible width path. We should stop using pixel-based sizes, instead we use the em or percentage in the stylesheet. This feature help us to make designing for multiple screens easier. Here the column widths are proportional rather than fixed. Fluid web page design can be more user-friendly, because it adjusts to the user's set up.
For example: width: 1126px; will be width: 98%;
2. Flexible Images - The usage of fluid images causes the adjustment of the size to the parent block. The images will scale out according to the screen resolution/size. If the parent block is smaller than the size of image then the image is reduced proportionally.
The most common relative solution is to set the max-width of the image at 100%. The max-width style means that an image won't exceed the width of its container. Instead of specifying a width and height on the image tag, its best just to add the image tag without that information and rely on the max width.
3. Media Queries(@media) - Media queries allow the page to use different CSS style rules based on characteristics of the device the site is being displayed on, most commonly the width of the browser.
Media queries are used to write css for specific situations, which allows you to apply styles based on the information about device resolution. It can be set to detect such features as width, height, screen orientation, aspect-ratio and resolution. And also used to change the layout sizes and rules based on various devices. We have to specify some break points in the CSS.
@media only screen and (max-width: 768px) {}
@media only screen and (max-width: 320px) {}
© Leapfrog 2007-2016 All right reserved.