Vertical spacing between ASP:labels
-
I am new to asp.net and my biggest problems seem to always have to do with how to make my page display look half way decent. For example: I have created 3 asp:labels so I can display a company name, address, city state zip as an address block on an aspx page. I have no problem with displaying the data, but the labels are too far apart vertically. I would like for the labels to display close to each other so they look like an address block rather than 3 disassociated lines of information. Is there a way to do this in asp.net? Thanks
-
I am new to asp.net and my biggest problems seem to always have to do with how to make my page display look half way decent. For example: I have created 3 asp:labels so I can display a company name, address, city state zip as an address block on an aspx page. I have no problem with displaying the data, but the labels are too far apart vertically. I would like for the labels to display close to each other so they look like an address block rather than 3 disassociated lines of information. Is there a way to do this in asp.net? Thanks
My first suggestion, if you are not dynamically setting that data on the labels, do not bother using the label control at all. It causes overhead without any benefit. I would just set them in standard HTML. Just because it is an ASPX page, does not mean that everything has to be built using the Web Server Controls, you can mix it with standard HTML. I use DIV's and SPAN's heavily to format a page. As for spacing, you can adjust that using "styles" or Cascading Style Sheets class to specify the font, line-height and padding to obtain spacing you would like. Rocky <>< My Blog[^]