Answers for "css page borders"

CSS
6

how to add border in css

.div1{
	border: 10px;
    border-color: #000000;
    border-style: solid;
}
Posted by: Guest on January-04-2021
-2

css border

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

ul {
  display: block;
  width: 255px;
  border: 1px solid #007ab6;
  list-style: none;
  background: #fff;
  margin: 10px;
}

ul li {
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  text-overflow: ellipsis;
  display: inline-block;
  position: relative;
  vertical-align: middle;
}

ul li:before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: #ffffff;
  border: 1px solid;
  z-index: -3;
  box-sizing: border-box;
}

ul li:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: -2;
}

ul li:hover {
  overflow: visible;
  width: auto;
}

ul li a {
  position: relative;
  z-index: 1;
  text-decoration: none;
  background: #fff;
  padding: 10px;
  display: inline-block;
}
Posted by: Guest on March-18-2022

Browse Popular Code Answers by Language