Layout Math with CSS: Understanding calc

Over the last two decades layout on the web has evolved from fixed-width designs to responsive, modular pages. CSS’s declarative “a box this wide in pixels, always” has become much more fluid and subtle. Site stylesheets often feature a mixture of units, all interacting with each other to create a design. Designers and developers need to understand the role of each CSS measurement system, but they also require a method of binding and adding these units together in stylesheets.

Into this role steps the powerful calc. For all it’s usefulness, the application of calc isn’t always obvious; its best appreciated through example.

source

Leave a Reply

Your email address will not be published. Required fields are marked *