Remove styles.css
article thumbnail

20 Basic CSS Tips for Designers

HONGKIAT

Example: :root { --main-color: #c06c84; } body { background-color: var(--main-color); } 4. Use Flexbox and Grid for Layouts Flexbox and Grid are powerful layout systems in CSS. They can make creating complex layouts easier. Example: @media (max-width: 600px) { body { background-color: lightblue; } } 6.

Coding 103
article thumbnail

10 Common CSS Mistakes Developers Often Make

HONGKIAT

Instead of this: box { background-color: #000; background-image: url('image.jpg'); background-repeat: no-repeat; background-position: center; } You can write this: box { background: #000 url('image.jpg') no-repeat center; } Shorthand properties can make your CSS much shorter and easier to read and maintain.

Color 114