Abstract
In this chapter you’ll learn how to use CSS to position elements, and create CSS layouts. This is something that CSS has historically been weak at—CSS 2.1-based layout techniques use properties not originally intended for page layout, and unsuited for today’s web applications. We’ll start by revisiting the basics: the CSS box model, floats, positioning and friends, and how to use them to create flexible and fixed layouts. We’ll then take a look at the hidden power of @media media queries and see how you can adapt your CSS to present a customized experience to devices based on their capabilities, under the banner of Responsive Web Design. Then we’ll end with a peek into the future of CSS3 layout specifications. But first let’s visit the past to examine some trends that have influenced CSS layouts and set the stage for why media queries have become so important recently.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2012 Richard Clark, Oli Studholme, Christopher Murphy and Divya Manian
About this chapter
Cite this chapter
Clark, R., Studholme, O., Murphy, C., Manian, D. (2012). A Layout for Every Occasion. In: Beginning HTML5 and CSS3. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-2875-2_9
Download citation
DOI: https://doi.org/10.1007/978-1-4302-2875-2_9
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-2874-5
Online ISBN: 978-1-4302-2875-2
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books