Reputation: 21
I am having a table which is getting the contents from service and I am using *ngfor to retrieve the data.
One of table row is like this :
<tr *ngFor="let d of data.body">
<td><strong [innerHTML] ="d.header"></strong><br>
<strong [innerHTML] ="d.subhead"></strong>
</td>
<td>
<span [innerHTML] ="d.display"></strong><br>
<span [innerHTML] ="display.subhead"></strong>
</td>
</tr>
I am getting the output as
Hello there
Dummy text
And I want the output to be:
Hello there
Dummy text
issue facing: I just need extra spacing between the strong and span tags. I tried to add classes to span and strong tags but its not as expected
Upvotes: 2
Views: 852
Reputation: 3631
Actually this is a CSS question.
You can use border-spacing
in your table:
table#welcome {
border-collapse:separate;
border-spacing: 0 1em;
}
<table id="welcome">
<tr>
<td>
<strong>Hello</strong>
<strong>there</strong>
</td>
</tr>
<tr>
<td>
<span>Dummy</span>
<span>text</span>
</td>
</tr>
</table>
Upvotes: 0