Learn CSS daily

Generate Your Own Playground

Type any CSS property and get a live, editable playground instantly.

right
.container { position: relative; width: 300px; height: 200px; border: 1px solid #000; } .box { position: absolute; right: 20px; top: 50px; width: 100px; height: 100px; background-color: lightblue; text-align: center; line-height: 100px; }

The 'right' CSS property specifies the position of an element's right edge in relation to its containing block. It is commonly used in conjunction with positioning properties like 'absolute' or 'relative' to control the horizontal placement of an element. By setting the 'right' property, you can effectively move an element towards the left or right side of its container.

resize
.resizable-box { width: 200px; height: 100px; border: 2px solid #007BFF; padding: 10px; resize: both; overflow: auto; }

The CSS 'resize' property allows you to control the resizability of an element. By applying this property, you can enable users to resize elements like textareas and divs in a web page. It can take values such as 'both', 'horizontal', 'vertical', or 'none' to specify the direction in which an element can be resized.

quotes
:root { quotes: '"“" "”"'; } .quote { font-size: 24px; font-style: italic; } .quote::before { content: open-quote; } .quote::after { content: close-quote; }

The CSS 'quotes' property allows you to specify the type of quotation marks to be used for the content of the 'content' property when using the '::before' and '::after' pseudo-elements. This can enhance the visual presentation of quoted text in a web document. By defining custom quotes, you can ensure consistency and style across your web pages.

position
.container {
  position: relative;
  width: 300px;
  height: 300px;
  border: 2px solid #000;
  margin: 20px;
}

.box {
  width: 100px;
  height: 100px;
  background-color: lightblue;
  margin: 10px;
  text-align: center;
  line-height: 100px;
}

.absolute-box {
  position: absolute;
  top: 50px;
  left: 50px;
  background-color: coral;
}

The 'position' property in CSS specifies how an element is positioned in the document. It can take values such as 'static', 'relative', 'absolute', 'fixed', and 'sticky', which determine the element's placement and movement relative to its normal position or the viewport.

pointer-events
.container { position: relative; width: 300px; height: 200px; border: 2px solid #333; }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 0, 0, 0.5); pointer-events: auto; }
.clickable { position: relative; z-index: 1; padding: 10px 20px; background-color: #4CAF50; color: white; border: none; cursor: pointer; }

The 'pointer-events' CSS property determines how an element responds to mouse events. By setting it to 'none', the element becomes transparent to mouse interactions, allowing clicks to pass through to elements behind it. This can be useful for creating overlays or managing z-index stacking without interfering with user interactions.