CSS - border-block-start-style Property



An element's logical block-start border style is determined by the border-block-start-style CSS property, which translates to a physical border style dependent on the writing mode, directionality, and text orientation of the element.

Possible values

Syntax

border-block-start-style = <line-style> 

Applies to

All the HTML elements.

CSS border-block-start-style - None Style

The following example demonstrates the usage of border-block-start-style property with non style value.

<html>
<head>
<style>
   .container {
      background-color: #c9abaf;
      width: 350px;
      height: 350px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
   }
   .demo-border {
      border-block-start-style: none; 
      border-block-start-width: 8px;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
   <p class="demo-border">This is a border-block-start-style example with none style.</p>
</div>
</body>
</html>

CSS border-block-start-style - Hidden style

The following example demonstrates the usage of border-block-start-style property with hidden style value.

<html>
<head>
<style>
   .container {
      background-color: #b6d9f0;
      width: 350px;
      height: 350px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
   }
   .demo-border {
      border-block-start-style: hidden; 
      border-block-start-width: 8px;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
   <p class="demo-border">This is a border-block-start-style example with hidden style.</p>
</div>
</body>
</html>

CSS border-block-start-style - Dotted style

The following example demonstrates the usage of border-block-start-style property with dotted style value.

<html>
<head>
<style>
   .container {
      background-color: #ffe4b5;
      width: 250px;
      height: 250px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
   }
   .demo-border {
      border: 5px green;
      border-block-start-style: dotted;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
<p class="demo-border">this is border-block-start-style example</p>
</div>
</body>
</html>

CSS border-block-start-style - Dashed Style

The following example demonstrates the usage of border-block-start-style property with dashed style value.

<html>
<head>
<style>
   .container {
      background-color: #f0e5c9;
      width: 350px;
      height: 350px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
   }
   .demo-border {
      border-block-start-style: dashed; 
      border-block-start-width: 5px;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
   <p class="demo-border">This is a border-block-start-style example with dashed style.</p>
</div>
</body>
</html>

CSS border-block-start-style - Solid Style

The following example demonstrates the usage of border-block-start-style property with solid style value.

<html>
<head>
<style>
   .container {
      background-color: #f0c7b1;
      width: 350px;
      height: 350px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
   }
   .demo-border {
      border-block-start-style: solid; 
      border-block-start-width: 6px;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
   <p class="demo-border">This is a border-block-start-style example with solid style.</p>
</div>
</body>
</html>

CSS border-block-start-style - Double Style

The following example demonstrates the usage of border-block-start-style property with double style value.

<html>
<head>
<style>
   .container {
      background-color: #edd97e;
      width: 350px;
      height: 350px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
   }
   .demo-border {
      border-block-start-style: double; 
      border-block-start-width: 9px;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
   <p class="demo-border">This is a border-block-start-style example with double style.</p>
</div>
</body>
</html>

CSS border-block-start-style - Groove Style

The following example demonstrates the usage of border-block-start-style property with groove style value.

<html>
<head>
<style>
   .container {
      background-color: #64e3ae;
      width: 350px;
      height: 350px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
   }
   .demo-border {
      border-block-start-style: groove; 
      border-block-start-width: 10px;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
   <p class="demo-border">This is a border-block-start-style example with groove style.</p>
</div>
</body>
</html>

CSS border-block-start-style - Ridge Style

The following example demonstrates the usage of border-block-start-style property with ridge style value.

<html>
<head>
<style>
   .container {
      background-color: #64bfe3;
      width: 350px;
      height: 350px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
   }
   .demo-border {
      border-block-start-style: ridge; 
      border-block-start-width: 10px;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
   <p class="demo-border">This is a border-block-start-style example with ridge style.</p>
</div>
</body>
</html>

CSS border-block-start-style - Inset Style

The following example demonstrates the usage of border-block-start-style property with inset style value.

<html>
<head>
<style>
   .container {
      background-color: #ebcdf7;
      width: 350px;
      height: 350px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
   }
   .demo-border {
      border-block-start-style: inset; 
      border-block-start-width: 10px;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
   <p class="demo-border">This is a border-block-start-style example with inset style.</p>
</div>
</body>
</html>

CSS border-block-start-style - Outset Style

The following example demonstrates the usage of border-block-start-style property with outset style value.

<html>
<head>
<style>
   .container {
      background-color: #e8879c;
      width: 350px;
      height: 350px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
   }
   .demo-border {
      border-block-start-style: outset; 
      border-block-start-width: 8px;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
   <p class="demo-border">This is a border-block-start-style example with outset style.</p>
</div>
</body>
</html>

CSS border-block-start-style - Writing Mode

The following example demonstrates the usage of border-block-start-style property with vertical writing mode.

<html>
<head>
<style>
   body {
      font-family: 'Arial', sans-serif;
      margin: 50px;
      padding: 50px;
      background-color: #f0f0f0;
   }
   .container {
      background-color: #77c6ed;
      width: 450px;
      height: 450px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 10px;
      box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
   }
   .demo-border {
      writing-mode: vertical-rl;
      border: 6px dashed blue;
      border-block-start-style: groove;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
      color: #333;
   }
</style>
</head>
<body>
<div class="container">
<p class="demo-border">This is border-block-start-style example with vertical text</p>
</div>
</body>
</html>
Advertisements