Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Vertical spacing between ASP:labels

Vertical spacing between ASP:labels

Scheduled Pinned Locked Moved ASP.NET
tutorialcsharpasp-nethelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    j1webb
    wrote on last edited by
    #1

    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

    R 1 Reply Last reply
    0
    • J j1webb

      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

      R Offline
      R Offline
      Rocky Moore
      wrote on last edited by
      #2

      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[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups