locked
Adjusting controls on web form layout RRS feed

  • Question

  • User-542418535 posted

    Hello. I am using Microsoft Web Developer. I am finding working with the controls on the web form very annoying, as it is hard to place and rearrange the various components e.g. labels, unlike in Microsoft Visual C#, where you can freely position and adjust controls where you want them to be. I have tried using tables, and though they work, the components are hard to position (see the link below with labels). I looked under the source code of the web form and saw that is component didnt have a x and y code to position it. Is there an easier way of laying out the controls?

    http://imageshack.us/a/img10/2388/designview.png



    Sunday, April 7, 2013 6:47 PM

Answers

  • User-1910946339 posted

    Web pages use a different layout mechanism from WinForms applications (nothing to do with C#, its the UI technology that you are using).

    Web layout used to be done primarily using tables but the general approach now is to use CSS for styling of pages.   There will be a gazillion page in the internet about how to style using CSS.  For inspiration have a look at http://www.csszengarden.com/ or http://alistapart.com/

    Remember web pages can be viewed on desktop computers with giant monitors or on mobile phones with tiny screens, specifying exact positioning in the style that desktop applications do is normally not a good idea on the web.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, April 7, 2013 8:40 PM