How to add space for shortcut text dynamically in asp.net

Hi everyone, I am trying to add the image dynamically in Label, as it should, which works fine, but I would like to add spaceafter the image, and I would like to write mt the required text, which I tried as follows but I can not find a place between the image and the text

Label1.Text = "<img src='Images/warning (1).png' />Select atleast one?";

I need space (tab space) after image

My current one is as follows

enter image description here

0
source share
4 answers

Add &nbsp;(space).

Label1.Text = "<img src='Images/warning (1).png' />&nbsp;&nbsp;&nbsp;&nbsp;Select atleast one?";
+5
source

Well you can try

Label1.Text = "<img src='Images/warning (1).png' />nbsp;nbsp;nbsp;nbsp;Select atleast one?";

or you can use two different controls: one for the image and one for the text, as well as a table to make them “beautiful”

+1

, css,

img{ margin-right:5px; }
+1
Label1.Text = "<img src='Images/warning (1).png' />&nbsp;&nbsp;&nbsp;&nbsp;Select atleast one?";
0
source

All Articles