Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equal spaces between CSS border dots?

Tags:

html

css

I have a CSS code which creates a simple dotted border here:

border: 5px dotted #ff2100

Now the problem is at the very top where those two last dots are too close to each other...

enter image description here

What if I want equal spaces between all of the dots... Please help...

Edit: I need it only on chrome and Here is the whole CSS (border: 5px dotted #ff2100 is at the very end...)

html {
overflow: hidden; 
  width: 1470px;
  height: 450px;
  margin-top: -3px;
  margin-left: 5px;
}
.row {
  display: flex;
}

.column {
  flex: 50%;
}

.profile {
  padding: 0px;
  margin: 100px 70px 0px 0px;
  width: 50%;
  height: 25px;
  box-sizing: border-box;
  color:#161b7a;
}

.profile .name {

  margin-right: -260px;
  font-family: "Helvetica";
  font-weight: 600;
  src: url(helveticaneue-ultrathin.woff);
  float: right;
  width: 200px;
  height: 50px;
}

.profile .job {


  margin-right: -260px;
  margin-top: 25px;
  font-family: "Helvetica";
  font-weight: 100;
  font-size: 14px;
  color: #b69cd1;
  src: url(helveticaneue-ultrathin.woff);
  float: right;
  width: 200px;
  height: 50px;
}


.profile .count {
  float: right;
  margin-right: 60px;
  margin-top: -2px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 100;
  src: url(helveticaneue-ultrathin.woff);
  color: #E6E0EC;
  font-size: 21px;
  min-width: 76px;
}

.profile img.profilePic {
  position: absolute;
  margin: -50px 70px 50px 50px;
  background: #2f293d;
  border: 4px solid #2f293d;
  padding: 1px;
  border-radius: 50%;
  box-shadow: .2rem .2rem 1rem rgba(0, 0, 0, .5);
}

.profile img.profileDia {
  position: absolute;
  margin: -7px 70px 50px 560px;
  width: 2.3%;
  height: auto;
}




.points {
  position: absolute;
  margin: -2px 100px 100px 490px;
  float: right;
  font-family: "Verdana";
  font-weight: 800;
  src: url(helveticaneue-ultrathin.woff);
  color: #0047ba;
  font-size: 18px;
}

.level {
  position: absolute;
  margin: 25px 100px 100px 135px;
  float: right;
  font-family: "Helvetica";
  font-weight: 800;
  src: url(helveticaneue-ultrathin.woff);
  color: #ed0909;
  font-size: 20px;

  display: block;
    height: 40px;
    width: 40px;
    line-height: 40px;

    -moz-border-radius: 30px; /* or 50% */
    border-radius: 30px; /* or 50% */

    background-color: #2c094f;
    color: white;
    text-align: center;
    font-size: 1.3em;
}



.profile img.profilePic.custom-borderA {
   border: 5px dotted #ff2100

}

HTML

<div class="row">
  <div class="column">
    <div class="profiles"></div>
  </div>
  <div class="column">
    <div class="profiles"></div>
  </div>
</div>

 <link rel="stylesheet" href="Style.css">
<script src="Script.js"></script>
like image 442
Sara Ree Avatar asked Apr 22 '19 07:04

Sara Ree


People also ask

How do you put a space between dotted borders in CSS?

The task is to increase space between the dotted border dots. you can just adjust the size with the background-size property, the proportion with the background-image property, and the proportion with the linear-gradient percentages.

How do you control a dashed border in CSS?

We can create the dashed border by using a path or a polygon element and setting the stroke-dasharray property. The property takes two parameters where one defines the size of the dash and the other determines the space between them.

How do you put a space between borders and divs?

You can do one of 2 things. What you're coding for will determine what you use. Padding could be added to the container (outer) element to push the element inside away from it's border. Margin could be used on the inner element to push itself away from the container.

How to increase the space between dotted border dots using CSS?

How to increase the space between dotted border dots using CSS? The task is to increase space between the dotted border dots. you can just adjust the size with the background-size property, the proportion with the background-image property, and the proportion with the linear-gradient percentages.

What is border-style in CSS?

CSS Border Style The border-style property specifies what kind of border to display. The following values are allowed: dotted - Defines a dotted border

Is there a way to increase the number of dots in CSS?

AFAIK there isn't a way to do this. You could use a dashed border or perhaps increase the width of the border a bit, but just getting more spaced out dots is impossible with CSS.

What is outset border in CSS?

outset - Defines a 3D outset border. The effect depends on the border-color value The border-style property can have from one to four values (for the top border, right border, bottom border, and the left border). A dotted border. A dashed border.


1 Answers

You can't fix this issue with pure css here. You can use a background image or a border-image that does the trick.

like image 58
errorau Avatar answered Dec 01 '22 00:12

errorau