Skip to main content

Border Style Property - CSS

The border-style property sets the style of an element's for borders. List of all the border styles as shown on below sample.

DEMO

Solid
Dotted
Dashed
Double
Groove
Ridge
Inset
Outset

HTML

<article class="grid-box">
  <div class="solid">Solid</div>
  <div class="dotted">Dotted</div>
  <div class="dashed">Dashed</div>
  <div class="double">Double</div>
  <div class="groove">Groove</div>
  <div class="ridge">Ridge</div>
  <div class="inset">Inset</div>
  <div class="outset">Outset</div>	
</article>

CSS

.grid-box {
  display: grid;
  grid-template-columns: auto auto;
  grid-gap: 0.5em;
}
.grid-box div {
  border-width: 6px;
  padding: 0.5em;
  border-color: hotpink;
}
.grid-box div.solid {
  border-style: solid;
}
.grid-box div.dotted {
  border-style: dotted;
}
.grid-box div.dashed{
  border-style: dashed;
}
.grid-box div.double{
  border-style: double;
}
.grid-box div.groove{
  border-style: groove;
}
.grid-box div.ridge{
  border-style: ridge;
}
.grid-box div.inset{
  border-style: inset;
}
.grid-box div.outset{
  border-style: outset;
}

Comments

Popular posts from this blog

Create Vertical Text - CSS

From the old internet, the direction of text is pretty much fixed on left-to-right. In modern CSS has addressed the issue and supports vertical text with ease. Right to Left Vertical Text Right to Left Vertical Text HTML <div class= "v-rl" > <p> Right to Left </p> <p> Vertical Text </p> </div> CSS .v-rl { writing - mode : vertical - rl; } Left to Right Vertical Text Left to Right Vertical Text HTML <div class= "v-lr" > <p> Left to Right </p> <p> Vertical Text </p> </div> CSS .v-lr { writing - mode : vertical - lr; } All Characters Upright All Characters Upright Ultraman ウルトラマン HTML <div class= "t-upright" > <p> All Characters </p> <p> Upright </p> <p> Ultraman ウルトラマン </p> </div> CSS .t-upright { writing - mode : vertical - rl; text - orie...

Input Range with CSS

  Use ::in-range and ::out-of-range pseudo-classes to style input depending on input value. DEMO 1 to 10 are valid. HTML < label > 1 to 10 are valid .</ label > < input type = "number" value = "1" min = "1" max = "10" > CSS input : in - range { background - color: limegreen; } input :out - of - range { background - color: orange; }

Distortion Glitch Text Effect - CSS

  Use multiple text-shadow properly in CSS on a text by comma separating the values. DEMO Distortion CSS h2 { color : darkorange ; font-family : sans-serif ; font-size : 3.5em ; text-transform : uppercase ; text-shadow : -3px -3px 0 cyan , 3px 3px 0 pink ; }