If you have a small web browser resolution, then the site would “shrink” the pictures, text and layout to fit properly. If we set a font size of 100 percent to our
tag and style all further typography using ems, they will all be affected by that initial declaration. Any fixed-width design, using only media queries to adapt for different viewports, will merely 'snap' from one set of CSS media query rules to the next with no linear progression between the two. In it, he provided a simple and consistent formula for converting fixed width pixels into proportional percentages: Does that smell a bit like an equation to you? var title=document.title Use 2 column layout … A liquid page layout (sometimes called “fluid” or “fluid width”) uses relative units instead of fixed units. If the Golden Ratio can suffer such precise measurements, I'm inclined to believe our web designs can too. So we'll amend the code as follows: That was easy enough! The term 'em' is simply a way of expressing the letter M in written form and is pronounced in the same way. The template is a "liquid layout", so it expands and contracts as you change your browser size. user sees on the screen. Shift the decimal and we have a result of 22.7083333 percent for the sidebar. How a web page appears in the browser depends on a number of factors: Most users today are using 800 x 600 or 1024 x 768 resolution CSS Example for Fixed Width: #content { width:600px; } Typically a liquid layout will use percentages instead of pixels, but any relative unit of measurement will work, such as ems. It’s the same html we used to create a 2 column fixed width layout with one exception. When I first started making websites at the end of the 1990s, layout structures were table-based. width. by Alessandro Fulciniti. As I mentioned, since the 'table layout' days, I've had little call to use proportional layouts. This article is an exclusive excerpt from Ben Frain's book Responsive Web Design with HTML5 and CSS3, published by Packt Publishing. Furthermore, the line-height (which was 40 px) is set in relation to the font itself (which was 38 px). Liquid has been in production use at Shopify since 2006 and is now used by many other hosted web applications. Putting Liquid Design into Practice. Liquid Layout is a general term that covers a set of specific liquid page rules: scale, re-center, guide-based, and object-based page rules. See the extname option for details. As the context is still the same (960 px), we just need to divide our target size by that figure. Web pages with fixed, pixel-based dimensions were the easiest way to match the fixed, pixel-based dimensions of the composite. Some critics of responsive design techniques (for example, see this article by James Pearce) argue that entering numbers such as .550724638 em into stylesheets is daft. We therefore need to set a proportional value for the width that the #wrapper should be in relation to the viewport size. Nobody much cared that sentences looked a little different on one screen compared to another. A fixed width design is a site that has a standard layout. Everything still looks fine at the same viewport size. Liquid is an open-source template language created by Shopify and written in Ruby. Using a flexible design (also known as liquid Specify the alternate page size and choose Object-Based from the Liquid Page Rule menu, then click OK. The logic, says Adobe, is that Liquid Layout is predicted to be used most often for output to formats that inherently support liquid layouts, such as HTML, SWF, and, in a future release, Adobe’s Digital Publishing Suite Content Viewer for tablets. stylesheet. If you’ve been following along with this series the html below should look very familiar. This was due to considerations of screen reading devices and varying windows sizes which designers have no control over. This site uses JavaScript. on the screen. width (width of all images and spacing) is less than the browser window Well, let’s start by looking at a typical 3 column page layout. A liquid file is a mix of standard HTML code and Liquid constructs. When you purchase through links on our site, we may earn an affiliate commission. var title = ""; default fonts available. Used by The fixed-width layouts are measured in pixels, but for liquid or fluid layouts, dimensions are defined in percentages, and as you might expect, this affords greater malleability and fluidity. settings. How to Build Flexible Design (Liquid Design) Web Page Layout To create a flexible design (liquid design) you use percentages instead of pixels to define your web page layout or the layout table if using tables. The three columns adjust their size as text size is adjusted. The size of the font the user has set in their browser (View, Text View Source Code | Preview. Liquid Layouts Below are liquid layouts where the layout spans the entire page width wise, expanding and contracting as the page is resized. and more people use phones and other mobile devices to surf the web the Again, this is as long as the total To adapt layouts when changing existing page sizes. We need something to 'hold' and become the context for all the proportional elements (content, sidebar, footer, and so on) we intend to contain within our design. I’ve removed the container div that wrapped the header, content, sidebar, and footer divs. We can turn this into a percentage by moving the decimal place two digits to the right and we now have a percentage width for the header of 97.9166667. However, the navigation area isn't behaving. Example 1: Simple liquid layout in HTML and CSS. link as follows: