By clicking on “Accept all cookies”, you agree that cookies may be stored on your device in order to improve site navigation, to analyze the use of the site and to contribute to our marketing efforts. Check out our privacy policy for more information.

The 11 CSS properties you need to know about Webflow and how to use them

Illustration image 3D shapes

Introduction

Designing a website can be intimidating. Yet with the right tools and knowledge, you can create an effective and visually appealing website. Knowing how CSS properties work can help you take your design skills to the next level. CSS properties are an essential part of web design, giving you more control over how your page looks and functions. This article will provide an overview of 11 key CSS properties and how to use them on Webflow to create the perfect website for you or your business.

What are CSS properties?

CSS stands for Cascading Style Sheets and is a type of computer language used to create the look, feel and layout of web pages. It can be used to control the layout of several web pages at once. CSS properties are the specific rules that determine how HTML elements appear on a web page. These properties are assigned values such as color, font family, width, height, margin size and fill. With CSS properties, you can customize the way an individual element appears on your web page, by changing its size or color, or removing it entirely from the display.

CSS properties also enable developers to create interactive features using JavaScript libraries such as jQuery UI or ReactJS. This allows developers to add dynamic visual effects such as animations or transitions without having to write code directly in HTML.

1. display" property: how to manage the display

The"display" CSS property is used to configure the display of elements on a website. There are several values for this type of style:

  • Block: Elements are displayed one below the other and take up the maximum possible width.
  • Flex: Elements can be positioned on a vertical or horizontal axis, aligned and justified.
  • Grid: Elements are placed in rows and columns (in a grid)
  • Inline: Element width and height are defined by text size and height between texts
  • Inline-block: Same as inline, with the difference that we can define a width and height
  • None: Elements are not visible

By default, in Webflow, when a new element is inserted, it takes on a display property with a "Block" value.

2. Width" & "height" properties: To manage sizes

The"width" property manages element width, while"height" manages element height.

Here too, we can give values in rem, px, ch, em, vw, vh or auto.

The"min-width" and"min-height" properties can be used to define minimum sizes, while the"max-width" and"max-height" properties can be used to define maximum sizes.

3. color" property: to manage text color

"color" is used to define the color of a text. The value can be a color name (e.g."yellow"), a hexadecimal value(HEX) or an RGB value.

4. text-align" property: manage text alignment

With"text-align", you can define text alignment within a block or for a text element. Natively in Webflow, you have 4 alignment possibilities(text-align: left; text-align : right; text-align : center; text-align : justify).

With a little customization, you can add other values such as text-align: justify-all; text-align: start; text-align: end; text-align: match-parent; etc.

5. font-weight" property: manage font weight

"font-weight" lets you define the weight/thickness of your fonts.

In Webflow, you can define measures such as normal, medium, bold, semibold, light, etc., depending on the font you re using.

In CSS, you can also use these measurements or, if you prefer, use numerical values (e.g."700" for bold).

6. Overflow" property: Manage content overflow

The"overflow" property allows you to manage the display of part of the content or content that overflows the element that has this CSS property.

The values available in Webflow are :

  • visible: overflowing content is visible
  • hidden: content protruding from the element is hidden
  • scroll: you can scroll to see the content with a scrollbar (visible all the time)
  • auto: you can scroll to see the hidden content with a scrollbar that appears only when the content exceeds the block.

7. Background-color" property: Manage background color

The "background-color" property lets you define a background color for an element.

In code, you can set different values:

  • The color of the name in English (yellow for example)
  • A hexadecimal value
  • An RGB value
  • RGBA value
  • HSLA value
  • value, etc.

8. Line-height" property: Manage the height between lines** This CSS property lets you customize the size (height) of the dividing line between text elements.

This CSS property lets you customize the size (height) of the separating line between text elements.

Values (in Webflow) can be REM, PX, EM, VW, VH, % or unitless. When there is no unit, the value is a multiplier of the font size. For example, if your font is 1 rem and the"line-height" is 2.6, then the separation between your text elements will be 2.6rem.

9. Margin" and "padding" properties: Manage spacing

The "margin" property is used to manage the outer margins between elements. For "padding", it s exactly the same, but for the inner margins of elements.

The values of these CSS properties are numbers in px, %, ch, em, rem, vw, vh and auto (only for "margin").

We can apply margins only to certain sides with"margin-top","margin-bottom","margin-left" and "margin-right". Ditto for "padding" with"padding-top","padding-bottom","padding-left" and "padding-right".

10. opacity" property: opacity management

The"opacity" CSS property lets you apply more or less transparency to an element. Values for this property are numerical. With an opacity of 1, the element is fully visible; with an opacity of 0.5, the element is half transparent; and with an opacity of 0, the element is invisible because it is fully transparent.

11. Font-size" property: Manage font size

The "font-size" property lets you modify the size of your fonts. In Webflow, you can define sizes in rem, px, ch, vh, vw, %, etc.

Conclusion

CSS properties are a powerful tool for creating beautiful, functional websites. Knowing how to use the 11 CSS properties described in this article can help you achieve amazing results on Webflow. CSS is a versatile language, so don t be afraid to experiment with new techniques as you become more familiar with it. And don t be afraid to ask for help if you need it! Finally, working with CSS properties can be fun and rewarding, so enjoy the process and remember that practice can only make you better at using them.

You now have all the keys you need to understand why CSS properties are important for your Webflow site and how to use them.

Now it s your turn!