background preloader

FLUID

Facebook Twitter

A List Apart: Articles: Fluid Grids. Early last year, I worked on the redesign of a rather content-heavy website. Design requirements were fairly light: the client asked us to keep the organization’s existing logo and to improve the dense typography and increase legibility. So, early on in the design process, we spent a sizable amount of time planning a well-defined grid for a library of content modules.

Article Continues Below Over the past few years, this sort of thinking has become more common. Thanks to the advocacy of Mark Boulton, Khoi Vinh, and others, we’ve seen a resurgence of interest in the typographic grid, and how to use it on the web. And frankly, the idea’s been a smash hit: a million CSS frameworks have bloomed, with sundry tools to complement them, each built to make grid-based design even more accessible to the average designer. However, our client had one last, heart-stopping requirement: the design had to be fluid and resize with the browser window. Minimum screen resolution: a little white lie#section1. Adaptive CSS-Layouts: New Era In Fluid Layouts? | CSS. Advertisement Fluid web designs have many benefits, but only if implemented correctly.

With proper technique, a design can be seen correctly on large screens, small screens and even tiny PDA screens. With bad coding structure, however, a fluid layout can be disastrous. Because of this, we need to find ways to work around most, if not all, of the cons of fluid design. If you as a designer are going to go through all the extra work of creating a functional fluid layout, why not go a bit further and make it compatible with all resolutions, instead of just most? In this article, we’ll discuss effective techniques to create 100%-functional adaptive CSS-layouts, and provide details on other tutorials and practices.

Also consider our previous articles: Fixed vs. 1. Most of us have heard of the 960 Grid System for designing fixed-width Web pages. What Is a Fluid Grid? A fluid grid can be created through a smart use of DIV layers, percentages and very simple math. The Benefits A Note About Margins 2. CSS Float Theory: Things You Should Know | CSS. Dave Woods - HTML, CSS, Web Design » 100% Height Layout Using CSS. CSS layouts don’t have to be complicated but sometimes the things that should be simple and easy to do seem impossible at first. Within this tutorial, I’ll explain how 100% height can be achieved cross browser, using CSS. Here’s a very simple example of what this tutorial will create but it can also be used in much more sophisticated and complicated layouts. 100% Height Layout Using CSS I’ll dive straight in with this tutorial and start off with some very simple HTML code: <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " <html lang="en"> <head><title>100% Height CSS Layout</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <div id="container"> <h1>100% Height Demo</h1> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Quisque tempor. This will create a page with a heading and paragraph and should be simple enough so far. First, we need to give 100% height to both the html and the body tag. Fixed vs. Fluid vs. Elastic Layout: What's The Right One For You? Advertisement The problem has boggled the minds of Web designers for years: fixed, fluid, elastic or a hybrid layout design?

Each option has its benefits and disadvantages. But the final decision depends so much on usability that it is not one to be made lightly. So, with all the confusion, is there a right decision? By considering a few factors and properly setting up the final design, you can end up with a successful layout design that reaps all the benefits. This article discusses the pros and cons of each type of layout. Also consider our previous articles: Flexible Layouts: Challenge For The Future1, which discusses the challenges of flexible layouts for the future.Applying Divine Proportion To Your Web Designs2, which explains the process of applying divine proportion to fixed layouts, but concludes with applying the Rule of Thirds to fluid layouts. Why all the debate? 1. Fixed Website Layouts The image above shows the general outline of a fixed-width website layout. 2. Pros Cons 3. 4. Step by step CSS float tutorial.

Floatutorial takes you through the basics of floating elements such as images, drop caps, next and back buttons, image galleries, inline lists and multi-column layouts. General info Tutorial 1. Floating an image to the right Float an image to the right of a block of text and apply a border to the image. Tutorial 2. Float an image and caption to the right of a block of text and apply borders using Descendant Selectors. Tutorial 3. Float a series of images down the right side of the page, with content flowing beside them. Tutorial 4. Float a series of thumbnail images and captions to achieve an image gallery. Tutorial 5. Float a simple list into rollover "back" and next "buttons". Tutorial 6. Float a simple list, converting it into a horizontal navigation bar.

Tutorial 7. Float a scaleable drop cap to the left, resize it and adjust line-heights to suit your needs. Tutorial 8. Float a left nav to achieve a two column layout with header and footer. Tutorial 9. Griglie fluide | Articoli Css | Css.HTML.it. Mentre prima abbiamo calcolato percentuali relative alla larghezza di 998px dell’elemento #page, ora stiamo lavorando nel contesto di .entry .content, che è più piccolo. Come risultato, dobbiamo ridefinire il nostro contesto e lavorare sulla larghezza di .entry .content come punto di riferimento. Così, per definire la larghezza in percentuale dell’area del post, prendiamo la larghezza di 700px e la dividiamo per 844px: Per la colonna di 124px sulla destra, possiamo usare lo stesso punto di riferimento: Possiamo ora prendere le misure risultanti e inserirle nel CSS: Così abbiamo portato a termine il nostro lavoro (esempio).

Una nota sull’arrotondamento Come potete intuire dalla mancanza di hack particolari, ho avuto pochi problemi di compatibilità cross-browser con questa tecnica. Se state lavorando con margini sufficienti nella vostra griglia, ciò non dovrebbe costituire un problema. A Una griglia per tutte le stagioni Letture. How To Develop Elastic Grid Layouts In CSS. Flexible layouts are created by using relative measurements as opposed to absolute measurements. The question is relative to what? With elastic layouts the measurements are set relative to something internal to the design, usually the size of the type. We previously talked about fluid layouts, which I defined as using measurements relative to the browser window.

Moving from a fluid layout to an elastic layout is actually quite simple. In fact we only need to make one change to the css we previously used to make the layout change. Before getting to the code let me say the definitions above aren’t necessarily used by all. Flexible layout — any layout that uses relative measurements to allow the layout to resize under different conditionsFluid layouts — layouts with measurements relative to the browser windowElastic layouts — layouts with measurements relative to something internal to the design such as the size of the type Both fluid and elastic layouts are flexible. The HTML The CSS. Pixels to Ems Conversion Table for CSS. A companion reference to the article, The Incredible Em and Elastic Layouts With CSS. The em values in the table assume that the generic browser default setting of 16px font size has not being changed. It also assumes that the <body> has font size set to 1em or 100%.

Formula to calculate em equivalent for any pixel value required 1 ÷ parent font size (px) × required pixels = em equivalent Example: 770px wide, centred elastic layout using CSS and ems N.B. 1 ÷ 16 × 770 = 48.125em <html><body><div> … </div></body></html> *I deliberately hooked the formula for the tutorial around 1px, as a value that designers can easily relate to. Required element pixel value ÷ parent font size in pixels = em value So, our required width of 770px in ems can be calculated like this: Round corners in pure css for liquid design and transparent scrolling - tutorial and stylesheet.

There's a Liquid Corners Playgarden with examples (and more examples on the home page). See you later! Introduction You can have different wishes for a box with rounded (or other not-rectangular) corners of the border. My desires are: the boxes have to be collapsible, and working in a liquid / fluid design (regardless of the resolution or the measures of the window of the visitor). the boxes have to be scrollable over a not unicolored background (lines, an image, watermark), that means: transparent corners. no tables! No javascript! Without browser sniffer or resolution detector, leading to different stylesheets. pure css, so everybody can enjoy it! A glance at internet learned that a lot of solutions are traveling around the world. Example: try it by turning on a (history-)sidebar and varying it's width, or by de-maximizing the window and doing the same. Liquid everything! All kinds of liquid and transparent edges (round or not), and even collapsible and transparent parts of images. html.