---
title: "How Websites Were Built Before Flexbox and Grid"
url: https://daily.dev/posts/how-websites-were-built-before-flexbox-and-grid-fiqa1myfq
source_url: https://www.jstools.space/blog/css-before-flexbox
type: share
source: "JS Development"
author: "Anton Liberant"
published: 2026-08-02T13:10:29.951Z
updated: 2026-08-03T02:17:43.739Z
tags: ["css"]
upvotes: 227
comments: 42
language: 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) · 227 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 · 0 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)
