<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-websites-were-built-before-flexbox-and-grid-fiqa1myfq" -->

---
title: How Websites Were Built Before Flexbox and Grid | daily.dev
description: A historical overview of CSS layout techniques used before Flexbox and Grid existed. Covers floats and the clearfix hack, inline-block whitespace issues,...
canonical: https://daily.dev/posts/how-websites-were-built-before-flexbox-and-grid-fiqa1myfq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How Websites Were Built Before Flexbox and Grid | daily.dev
og:description: A historical overview of CSS layout techniques used before Flexbox and Grid existed. Covers floats and the clearfix hack, inline-block whitespace issues,...
og:url: https://daily.dev/posts/how-websites-were-built-before-flexbox-and-grid-fiqa1myfq
og:image: https://api.daily.dev/og/posts/Fiqa1MyfQ.png
og:image:alt: How Websites Were Built Before Flexbox and Grid
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How Websites Were Built Before Flexbox and Grid

**[JS Development](https://daily.dev/sources/jsdevelopment)** · [@anliberant](https://daily.dev/anliberant) · 225 upvotes · 42 comments

## Summary

A historical overview of CSS layout techniques used before Flexbox and Grid existed. Covers floats and the clearfix hack, inline-block whitespace issues, table-based layouts, spacer GIFs, image-based gradients and rounded corners, negative-margin centering, the box-sizing problem, and Internet Explorer compatibility hacks. Contrasts these painful workarounds with how modern CSS Grid and Flexbox solve the same problems in a fraction of the code. Notes that some legacy techniques (especially table layouts for HTML email) remain relevant today.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.jstools.space/blog/css-before-flexbox>

## Community discussion

Top comments from developers on daily.dev.

**@joriswouters** · 20 upvotes

> ![GIF](https://static.klipy.com/ii/d7aec6f6f171607374b2065c836f92f4/fd/ad/VZxaqGhv.gif)

**@springtofigh** · 10 upvotes

> Something as frustrating as float came to mind. Thanks to flexBox and grid❤️👌

**@sevensolutions** · 8 upvotes

> I can remember my early days when i downloaded the entire html and css of a good looking website and then removed everything step by step just to understand how the layout was working 🙈

**@palalet** · 5 upvotes

> Tables, baby, tables 🤣

**@anthonynikolov** · 4 upvotes

> Tables, floating and deisgn made on Photoshop. Let us don't forget the IE optimizations 🙃

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css)

[View this post on daily.dev](https://daily.dev/posts/how-websites-were-built-before-flexbox-and-grid-fiqa1myfq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/how-websites-were-built-before-flexbox-and-grid-fiqa1myfq","headline":"How Websites Were Built Before Flexbox and Grid","text":"Shared: CSS Layout Before Flexbox and Grid","url":"https://daily.dev/posts/how-websites-were-built-before-flexbox-and-grid-fiqa1myfq","datePublished":"2026-08-02T13:10:29.951Z","dateModified":"2026-08-03T02:17:43.739Z","author":{"@type":"Person","name":"Anton Liberant","url":"https://daily.dev/anliberant","image":"https://lh3.googleusercontent.com/a/AAcHTteX1jAsV7NIevHJk0k9z0vTRktfJmWn9I79VKpJ7Ypm1jqG=s96-c","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":3770}},"image":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":225},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":42}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/T6FQfJEwh"},"comment":[{"@type":"Comment","text":"","datePublished":"2026-08-02T17:53:05.669Z","url":"https://daily.dev/posts/Fiqa1MyfQ#c-yPHKgC2wG","author":{"@type":"Person","name":"Joris Wouters","url":"https://daily.dev/joriswouters","image":"https://lh3.googleusercontent.com/a/ACg8ocKq1-3ATui91TME7lcwL-rWPvaKDHgsEhBQIXzeyd3-=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":20}},{"@type":"Comment","text":"Something as frustrating as float came to mind. Thanks to flexBox and grid❤️👌","datePublished":"2026-08-02T18:07:51.381Z","url":"https://daily.dev/posts/Fiqa1MyfQ#c-lEVUMI5CO","author":{"@type":"Person","name":"Spring Tofigh","url":"https://daily.dev/springtofigh","image":"https://avatars.githubusercontent.com/u/90114320?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":10}},{"@type":"Comment","text":"I can remember my early days when i downloaded the entire html and css of a good looking website and then removed everything step by step just to understand how the layout was working 🙈","datePublished":"2026-08-02T18:41:24.784Z","url":"https://daily.dev/posts/Fiqa1MyfQ#c-VAESN8BZR","author":{"@type":"Person","name":"Daniel Peinhopf","url":"https://daily.dev/sevensolutions","image":"https://avatars.githubusercontent.com/u/84123899?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":8}},{"@type":"Comment","text":"Tables, baby, tables 🤣","datePublished":"2026-08-02T19:42:00.725Z","url":"https://daily.dev/posts/Fiqa1MyfQ#c-9g2xDaiaW","author":{"@type":"Person","name":"Radek Havelka","url":"https://daily.dev/palalet","image":"https://lh3.googleusercontent.com/a-/ACNPEu-o8MElSN4ROMgrqyjqrarlLqksiGLna5TAfYA1Jw=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"Tables, floating and deisgn made on Photoshop. Let us don’t forget the IE optimizations 🙃","datePublished":"2026-08-03T06:00:15.898Z","url":"https://daily.dev/posts/Fiqa1MyfQ#c-DcoquUjUX","author":{"@type":"Person","name":"Anthony Nikolov","url":"https://daily.dev/anthonynikolov","image":"https://media.daily.dev/image/upload/s--O0TOmw4y--/f_auto/v1715772965/public/noProfile"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/jsdevelopment","name":"JS Development"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"JS Development","item":"https://daily.dev/squads/jsdevelopment"},{"@type":"ListItem","position":3,"name":"How Websites Were Built Before Flexbox and Grid"}]}
```

