Mastering CSS Coding: Getting Started « Smashing Magazine
Advertisement CSS has become the standard for building websites in today’s industry. Whether you are a hardcore developer or designer, you should be familiar with it. Overview: What We Will Cover Today We’ll start with what you could call the fundamental properties and capabilities of CSS, ones that we commonly use to build CSS-based websites: Once you are comfortable with the basics, we will kick it up a notch with some neat tricks to build your CSS website from scratch and make some enhancements to it. 1. Most beginners get padding11 and margins12 mixed up and use them incorrectly. What Is Padding and Margin? Padding is the inner space of an element, and margin is the outer space of an element. The difference becomes clear once you apply backgrounds and borders to an element. Take a look at the visual below: Margin and padding values are set clockwise, starting from the top. Practical example: Here is an <h2>heading between two paragraphs. Margin and Padding Values Quick Tip 2. 3. 4. 5. 6. 7.