Here is the current structure I have:
<li class="myclass" ng-class="myAngularClass">
<div> div1
<div> div2
</div>
</div>
</li>
The li
element has dynamic dimensions and width. The class "myAngularClass"
includes a property background-color: green
.
Currently, the background color extends across the entire li
, covering all the nested div
elements within it. However, my goal is to limit the width of the background color to only 10% so that it finishes at the end of div1. While I've come across this resource, I'm unable to add extra tags due to limitations. The "myAngularClass" function returns a string that generates a class name with the desired background-color property set for the li
.
In essence, I am seeking a solution to apply a background color (like setting a background-color-width) to an element but restrict it to a specific length.
If anyone knows of a possible solution, please share your insights!