CSS Properties Explained

Hover over each card to learn more about important CSS properties

display: flex

Enables flexible layout with easy alignment of elements. Flex containers make it simple to arrange items in rows or columns with controlled spacing.

Element 1
Element 2
Element 3
float: left/right

Positions elements to the left or right, allowing text to flow around them. Often used for image placement in text layouts.

Float left
Float right

This text flows around the floated elements. Notice how content naturally wraps around each floated box, creating a layout with text flowing between elements.

overflow: hidden

Clips content that extends beyond the element's boundaries, preventing scrollbars and overflow visibility.

This text is too long and will be cut off by overflow:hidden when it extends beyond the set boundaries. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor.

width: fit-content

Automatically adjusts width to fit the content within, rather than stretching to fill available space or constraining to a fixed width.

This element has width:fit-content
font-family: Webdings

Uses the Webdings font for symbols instead of standard text characters. Useful for simple icons before modern alternatives like icon fonts.

abcdef ghijkl

(Note: Webdings displays symbols instead of letters)

justify-content: center

Centers items horizontally within a flex container, creating equal space before and after all items.

1
2
3
align-items: center

Aligns items vertically in the center within a flex container, perfect for creating vertically centered layouts.

Small
Medium
Large
height: 1rem

Defines element height using relative units, where 1rem equals the root font size (typically 16px). Scales with user preferences.

Height: 1rem
Height: 2rem (comparison)
max-width: fit-content

Limits the maximum width to the content's natural size, preventing oversized containers while allowing flexibility.

This element has max-width:fit-content
font: clamp()

Allows font sizes to scale responsively between minimum and maximum values, ensuring readable text at any screen size.

This text uses font: clamp(1rem, 2.5vw, 2rem)

Resize your browser to see how it adapts

color: gold

Sets text color to gold, adding a touch of elegance and emphasis to important content.

This text is written in gold color

white-space: nowrap

Prevents text from wrapping to a new line, even when it exceeds the container width. Useful for keeping related content together.

This text will not wrap even if it exceeds the width of the container. It will become horizontally scrollable instead. Try to scroll horizontally to see more text content.

ABOUT US