After browsing through numerous similar questions regarding this issue, I have not been able to find a solution that works for my specific case.
The HTML code in question is as follows:
a{
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.42857143;
color: #333333;
white-space: nowrap;
}
<ul>
<li>
<a>
<my-directive ng-click="someFunc">My text 1</my-directive>
</a>
</li>
<li>
<a ng-click="someFunc">My text 2</a>
</li>
</ul>
The issue arises with the first 'li' element where the 'ng-click' directive is applied to a child element within the 'a' tag, causing the 'li' element not to encompass the full height and width due to the padding on the 'a' element.
I am seeking assistance on how to resolve this problem while maintaining the padding on the 'a' element, ensuring that my directive takes up the entire width and height, including the padding. I have attempted using a negative margin for 'my-directive,' but it resulted in misplacement of text and no change in size.
If anyone has any suggestions or solutions, please feel free to share them. Thank you!