Skip to content

Comment on Ask HN: Best way to learn HTML and CSS for web design?parent

Comments

Some tips.

Keep your layouts flexible: * Avoid specifying widths and especially heights of individual elements unless really necessary. Allow the content to determine dimensions. * Set percentage based widths on overall containers (columns / grids). Allow these to constrain the dimensions of elements within. (Simplify your page structure as much as possible and don't overuse these.) * Use max-width to prevent elements from exceeding the dimensions of their containers: img {max-width: 100%;}

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.