Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What can't be done using CSS

Tags:

html

css

I've seen quite a few answers on this site which advocate using tables for a design because it can't be done using CSS and Divs... when in actual fact it can be done with a bit of ingenuity.

What are examples of things that genuinely can't be done?

The only one I've ever come across is vertically aligning a box within another box.

*edit: I suppose I'm mostly interested in unachievable layouts using CSS2

like image 381
wheresrhys Avatar asked Apr 15 '09 08:04

wheresrhys


1 Answers

  • Vertical alignment of blocks or text.

  • Having elastic containers that stretch to the width of their content.

  • Having several "rows" with the same structure where "cells" are synchronized in width throughout all rows.

  • Having several "columns" synchronize their height (up to the length of the longest text block).

These are quite basic designer needs that appear in even basic design concepts.

Cells/columns issues can possibly be solved with CSS if you take IE8 into account, but it will be many years until its wide spread (even IE7 in 2-3 years hasn't reached the desired market share).

As for "ingenuity", it is not that good thing in software development. Tricks that your colleagues and you yourself after a couple of months will not be able to understand usually build up that code base that everyone either is scared to touch or determined to refactor/rewrite completely.

Remember the KISS principle. The simpliest way you do this, the more reliably it will work.

like image 189
User Avatar answered Oct 11 '22 01:10

User