I am facing an issue with the code on my website:
<p-button (onClick)="deleteFile(attachment,user_agreement)" icon="fa fa-trash" iconPos="left" styleClass="ui-button-danger"></p-button>
<a href="{{attachment.filePath}}" target="_blank">{{attachment.originalFilename}} - {{attachment.fileSize/1024 | number:'1.1-2'}} KB - {{attachment.createTime | date:'short'}}</a>
The button is displaying a trash icon and has no text.
When viewing the webpage, the result looks like this https://i.sstatic.net/s8h6J.png
However, if I click on the text "Contents.json", it triggers the button instead.
Upon inspection, I noticed that there is a "span" element covering the text as shown in the screenshots provided https://i.sstatic.net/6Ku19.png
https://i.sstatic.net/E9Yoc.png
The <span>
has the class "ui-button-text" assigned to it. The definition for ui-button-text is as follows
body .ui-button .ui-button-text, body .ui-datepicker-buttonpane > button .ui-button-text {
padding: 0;
line-height: 2.25em;
min-width: 100px;
min-height: 2.25em;
text-align: left;
}
Since I never defined any CSS styles for ui-button-text, I would prefer not to modify the content. How can I fix this problem of the button label overlapping the clickable content below it?
Any help or suggestions are greatly appreciated!