jags
0
Q:

css border length

/* Answer to: "css border width" */

/*
  The border-width property specifies the width of the four borders.

  The width can be set as a specific size (in px, pt, cm, em, etc)
  or by using one of the three pre-defined values: 
  thin, medium, or thick:
*/

p.one {
  border-style: solid;
  border-width: 5px;
}

p.two {
  border-style: solid;
  border-width: medium;
}

p.three {
  border-style: dotted;
  border-width: 2px;
}

p.four {
  border-style: dotted;
  border-width: thick;
}

/*
  For more information go over to:
  https://www.w3schools.com/css/css_border_width.asp
  and you may also want to check out:
  https://www.w3schools.com/cssref/pr_border-width.asp
*/
3
div {
  width   : 200px;
  height  : 50px;   
  position: relative;
  z-index : 1;
  background: #eee;
}

div:before {
  content : "";
  position: absolute;
  left    : 0;
  bottom  : 0;
  height  : 1px;
  width   : 50%;  /* or 100px */
  border-bottom:1px solid magenta;
}
0
.page-title:after {
    content: ""; /* This is necessary for the pseudo element to work. */ 
    display: block; /* This will put the pseudo element on its own line. */
    margin: 0 auto; /* This will center the border. */
    width: 50%; /* Change this to whatever width you want. */
    padding-top: 20px; /* This creates some space between the element and the border. */
    border-bottom: 1px solid black; /* This creates the border. Replace black with whatever color you want. */
}
0

New to Communities?

Join the community