Learn CSS daily

Generate Your Own Playground

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

table-layout
.my-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.my-table th, .my-table td {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: left;
}

.my-table th {
  background-color: #f2f2f2;
}

The 'table-layout' CSS property defines the algorithm used to lay out table cells, rows, and columns. It can take values like 'auto' or 'fixed', where 'fixed' allows for a more predictable layout by setting the widths of columns explicitly, while 'auto' adjusts based on the content. This property is particularly useful for controlling the appearance of tables with varying content sizes.

tab-size
.code-example {
  font-family: monospace;
  background-color: #f0f0f0;
  padding: 10px;
  border: 1px solid #ccc;
}

pre {
  tab-size: 4;
  white-space: pre;
  margin: 0;
}

The 'tab-size' CSS property defines the width of tab characters in a text element. By default, tab characters may have a width of 8 spaces, but using 'tab-size', you can customize this to create a more visually appealing layout for your text. This property is particularly useful in code editors or text areas where alignment is important.

shape-outside
.container {
    width: 80%;
    margin: 20px auto;
}

.float-img {
    float: left;
    shape-outside: circle(50%);
    width: 150px;
    height: 150px;
    margin-right: 20px;
    clip-path: circle(50%);
}

p {
    line-height: 1.6;
}

The 'shape-outside' property allows you to define a shape around which inline content can wrap. This property is particularly useful for creating non-rectangular text flows around images or other elements, enhancing the visual layout of a webpage. It works in conjunction with the 'float' property to achieve the desired effect.

shape-margin
.shape {
  width: 200px;
  height: 200px;
  background-color: #4CAF50;
  clip-path: circle(50% at 50% 50%);
  shape-margin: 20px;
  margin: 50px;
  display: inline-block;
  position: relative;
} 

body {
  background-color: #f0f0f0;
  padding: 20px;
}

The 'shape-margin' property in CSS defines the space around a shape, providing a margin area that can be used to separate the shape from surrounding content. This property is particularly useful when working with shapes defined by the 'clip-path' property, allowing for better control over layout and spacing in designs involving non-rectangular elements.

shape-image-threshold
.image-container { width: 300px; height: 200px; overflow: hidden; position: relative; }
.shaped-image { width: 100%; height: auto; clip-path: polygon(10% 0%, 100% 10%, 90% 100%, 0% 90%); shape-image-threshold: 0.5; }

The 'shape-image-threshold' CSS property defines the threshold for the alpha channel of an image when used with the 'clip-path' property. It allows for the creation of non-rectangular shapes by specifying how much of the image's alpha channel is considered opaque. This enables designers to create visually appealing layouts with images that fit more organically into their designs.