arranging controls on screen

  • Thread starter Thread starter ma
  • Start date Start date
M

ma

Hello,

I am a C/C++ programmer and I designed several windows forms. In windows
forms each control has a position which is related to its container. This is
not the case in web forms. How can arrange controls in a web form? I know
that I can create a table and put each control on its cell, but it is
cumbersome and if you want to change the place of a control, it would be
difficult. What is the preferred way to arrange controls on a web form? Any
tutorial about this on web? Any information is much appreciated.



Best regards
 
Not really in the scope of this newsgroup, but if you want to use absolution
positioning you can, just like a web form, but I don't think it is
considered good practice.

Most people use DIV tags with margins etc to control the position on
elements, and the "float" style to dictate how they position relative to
each other.
 
I understand your first reaction to table layout.

Web development is an entirely different world. You will be very frustrated
if you will try to apply things from windows forms world. As far as
arranging controls is concerned, in web it is opposite. Absolute and
table-free arranging is cumbersome and requiring much higher level of
understanding and experience. Table layout is simple and reliable. Use it
and you will save a lot of time and effort.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
the main issue with absolute position (and why ms gave it up), is there
is no logical units, only pixels. as font sizes vary by browser, this
means the positions all need to be redone in client code after a render,
or there is overlap.

-- bruce (sqlwork.com)
 
Thanks,

Would you please lead me to more information about using this technique?
For example a simple arrangement that involves several div and controls.



Best regards
 
Back
Top