paperlined.org
dev > web > formats > css
document updated 4 hours ago, on Dec 22, 2025

Quick solutions for CSS

Make a <div> not take up the full width

width: fit-content;

Center

margin: 0 auto;

Scale an image down

width:auto; height:300px

or

width:300px; height:auto

depending on which dimension you want to constrain. This leaves the aspect ratio intact.

Note, however, that width and height default to 'auto', so you really only have to specify the one value.

Rounded corners

border-radius: 20px;

Drop shadow

filter: drop-shadow(10px 10px 4px #666);