0

I have a problem to add a line break after a N (3 for example) elements of a list: I have tried to do like this Q/A solution (using :nth-child(3):after { content:"\A"; white-space:pre; }) tells but id didn't work for me.

Here is my css

.lk-color-chooser {
 list-style-type: none;
 padding-left: 0;
}
.lk-color-chooser__color {
 display: inline-block;
 width: 30px;
 height: 30px;
 border-radius: 50%;
 margin-right: 5px;
 cursor: pointer;
 opacity: 0.5;
 filter: alpha(opacity=50);
}
.lk-color-chooser__color:hover,
.lk-color-chooser__color.selected {
 opacity: 1;
 filter: alpha(opacity=100);
 }
.lk-color-chooser__color:last-child {
 margin-right: 0;
}

Here is a plunker The code is done in angular but the problem is a css one.

Here is one of the list element : <li class="lk-color-chooser__color ng-scope ng-isolate-scope" style="background-color: #72C2FF" ng-repeat="color in colors track by $index" color="color" ng-class="{'selected': selectedColor == color}">&nbsp;</li>

Thanks in advance,

Community
  • 1
  • 1
Master Mind
  • 3,014
  • 4
  • 32
  • 63
  • I added an example to the question – Master Mind Apr 28 '15 at 20:21
  • I don't see any angular or `li` elements in the plunkr either – floribon Apr 28 '15 at 20:22
  • I'm sorry it's my fault it was the wrong plunker. It's fine now – Master Mind Apr 28 '15 at 20:24
  • Check out the 2nd answer [here](http://stackoverflow.com/questions/17768902/how-to-insert-new-line-within-ng-repeat-of-the-middle-angularjs-twitter-boots), suggests using `
    `
    – Daniel Apr 28 '15 at 20:48