Angular: Why doesn't CSS justification work with ng-repeat?
The whitespace between the li
elements (necessary for the justification) is not emitted with Angular's repetition. You also have to wrap the whitespace so it gets repeated. You can do something like:
<span ng-repeat-start="item in items"></span>
<li></li>
<span ng-repeat-end></span>
http://jsfiddle.net/M8228/1/
HTML CSS justify trick does not work in combination with angularJS
Take a look at this fiddle, I think is what you need: http://jsfiddle.net/2AaWf/10/
I included also a live AngularJS example. The idea is to use a wrapper element (a span), and to put the link and a whitespace inside it.
<span data-ng-repeat="tag in tags" href="#"><a href="#">{{tag.name}}</a> </span>
Angular ng-repeat to PDF or printer CSS presumed alignment issue
The issue is caused by css-border. You can use @media print and play around with the border thickness.
I had similar problem when generating a bar code. The bottom border always overlapped on bar code itself when printing from chrome or Firefox but it always worked in IE, not sure why it just worked in IE. You can also try IE and see if that works for you.
List items not correctly aligning with an ng-repeat
Might something like this be what you are looking for?
.one-third:nth-of-type(3n+1) {
clear: both;
}
I.e. if you want to have exactly a maximum of 3 li
s per row, and you want to always align your rows vertically, you'll need to explicitly do so.
Edit: And of course you could do this also with Angular, for example like this, first define a clearing class:
.clear-li {
clear:both
}
and then apply it with ng-class
:
<li class="grid-col one-third" ng-repeat="job in Jobs" ng-init="descriptionLimit = 20" ng-class="{'clear-li': ($index % 3 === 0)}">
Applying CSS style conditionally in ng-repeat in AngularJS
You would do this using the ng-class
directive. You'll simply add your styling as a class in your stylesheet and change your angular code to this:
<tr ng-repeat="data in userList"
ng-class="{ 'my-css-class': data.appDate>=delivery.joinedDate }">
<td>{{$index+1}}</td>
<td>{{data.name }}</td>
<td>{{data.age}}</td>
<td>{{data.dept}}</td>
<td>{{data.appDate }}</td>
<td>{{data.joinedDate}}</td>
</tr>
Stylesheet:
.my-css-class {
background-color: #ffd6d6;
border: dashed 3px #9e0b0f;
}
Related Topics
Update Progressbar in Each Loop
Detecting Physical Screen Dimensions of Webkit Devices in JavaScript
iPad Safari Development Toolbar
Making an Element Visible by Hovering Another Element (Without :Hover-Property)
Why Do Arabic Characters Behave as Separate Characters When Styling Single Arabic Character
How to Get the CSS Left-Property Value of a Div Using JavaScript
Disable Double Tap Zoom/Resize on Safari iOS12***
Applying More in Depth Selection to the :Host CSS Pseudo Class
Jquery .Css() Function Not Returning Expected Values
How to Check If Character Isn't Supported by the User's Browser in JavaScript
Using !Important in Jquery's CSS() Function
Pause/Resume CSS Animations When Switching Tabs
Saving Dropdown Menu Selection in a Cookie
How to Over-Ride CSS with User-CSS on Mobile Safari
CSS Select All Previous Siblings for a Star Rating
Create New Row Every 2 Records Using Knockout Foreach
Uncaught Domexception: Failed to Read the 'Rules' Property from 'Cssstylesheet'