By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,454 Members | 1,804 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,454 IT Pros & Developers. It's quick & easy.

Layout basics

P: n/a
I am looking for good guidance for positioning controls on the
form.document, it is absolute nightmare and I don't know where to begin

Thank you,
Samuel Shulman
Jun 14 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Samuel,

As an admitted newbie, I can certainly see why you would call the
positioning issue an "absolute nightmare." In fact, it is a nightmare for
many of us, and no piece of cake to those of us with quite a bit of
experience. And I wish I had some simple rules for you to follow. But there
are none. I'm going to start from the beginning, and please forgive me if I
tell you anything you already know.

ASP.Net is a technology for developing web applications. A web application
is an application in which the vast majority of the programming is on a
server machine, but the user interface is presented via a "thin-client" HTML
browser user interface.

I'm sure you've visited many web sites, and viewed many web pages, even as
an end-user. What I'm not sure about is if you're at all familiar with HTML
(HyperText Markup Language), which is the text-based language that provides
the display in a browser. HTML started out as an invention of the Mosaic
group, who created the first web browsers, and a language for formatting
display in those browsers. It quickly caught on, and before you know it,
there were several popular web browsers, and several different "flavors" of
HTML floating around. Things began to get complicated. There were no
standards, and the major players in the game were all trying to outdo each
other with browsers that did more, which meant creating HTML that enabled
browsers to do more. Thus began the infamous "browser wars" not so long ago,
in a galaxy not so far away.

Thankfully, standards organizations like the W3C (World-Wide Web Consortium)
and ISO (International Organization for Standards) began to get involved, to
bring some order to the chaos, and make life simpler for everyone. And that
goal is being realized, but is not yet fully realized. So, between "legacy"
HTML, and the various flavors of browsers, perhaps most notably IE 6, which
has long outlived its heyday, soon to be replaced by the standards-based
IE7, which has been delayed for entirely too long, we have an "absolute
nightmare" involved in doing layout that looks more or less the same in the
major browsers.

HTML started off rather simply, with not much thought in the way of fancy
layout, and the use of an ever-expanding list of inline attributes to handle
layout properties. In the beginning, HTML was laid out in a "flow layout" in
which various elements simply appeared in the browser in the order in which
they existed in the markup language, some on new lines, and some inline.
This was an increasingly troublesome situation. The first solution was the
use of HTML tables to provide enhanced layout capabilities. But this was
only a partial solution, and not extremely well-thought-out. Tables still
used inline markup and were limited to a tabular format.

The advent of CSS (Cascading Style Sheets) changed all that. CSS could be
written as inline style attributes, or in a single block in the head of an
HTML document, or even as an external document that was linked to HTML
elements via style names, element names, and id attributes. CSS was not
limited to a tabular format; in fact, elements could be freely positioned in
any variety of ways. Now CSS is the dominant layout methodology. But CSS is
more complex than tables. CSS elements can be positioned absolutely
(relative to the page) or relatively to other elements.

Getting back to ASP.Net now, ASP.Net was an evolution in web application
development, which started with CGI, ASP, and other similar technologies.
Microsoft decided that ASP should behave in a familiar way, and thus
introduced the concept of the "WebForm," which is intended to behave much
like a Windows Form, both to the developer and to the user. Of course, it
can't really, but it does a decent job of approximating much of the look and
feel.

Because Windows Forms use "absolute positioning" in a Form interface, the
default layout "style" of a WebForm is called "grid layout." This uses CSS
absolute positioning. However, because a browser with HTML is not a Windows
Form application, and browsers are all different, well, it is only partially
successful. WebControls and HtmlControls are actually server-side classes
that present themselves as HTML elements or combinations thereof on the
client browser.

Bottom line is, there are 2 basic paths you can take, and each has its
plusses and minuses. You can use "flow layout" and HTML tables, which is
simpler, but less flexible and extensible, or you can use "grid layout" and
absolute positioning. Or, you can mix and match. But in any case, you're
going to have to learn a good bit more about HTML, JavaScript and CSS to get
any good at it. And test in a variety of browsers, screen resolutions, etc.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

A lifetime is made up of
Lots of short moments.

"Samuel Shulman" <sa************@ntlworld.com> wrote in message
news:eF**************@TK2MSFTNGP02.phx.gbl...
I am looking for good guidance for positioning controls on the
form.document, it is absolute nightmare and I don't know where to begin

Thank you,
Samuel Shulman

Jun 14 '06 #2

P: n/a
Hi Kevin

Nice reply! :)
Thanks!

Kevin Spencer wrote:
Hi Samuel,

As an admitted newbie, I can certainly see why you would call the
positioning issue an "absolute nightmare." In fact, it is a nightmare for
many of us, and no piece of cake to those of us with quite a bit of
experience. And I wish I had some simple rules for you to follow. But there
are none. I'm going to start from the beginning, and please forgive me if I
tell you anything you already know.

ASP.Net is a technology for developing web applications. A web application
is an application in which the vast majority of the programming is on a
server machine, but the user interface is presented via a "thin-client" HTML
browser user interface.

I'm sure you've visited many web sites, and viewed many web pages, even as
an end-user. What I'm not sure about is if you're at all familiar with HTML
(HyperText Markup Language), which is the text-based language that provides
the display in a browser. HTML started out as an invention of the Mosaic
group, who created the first web browsers, and a language for formatting
display in those browsers. It quickly caught on, and before you know it,
there were several popular web browsers, and several different "flavors" of
HTML floating around. Things began to get complicated. There were no
standards, and the major players in the game were all trying to outdo each
other with browsers that did more, which meant creating HTML that enabled
browsers to do more. Thus began the infamous "browser wars" not so long ago,
in a galaxy not so far away.

Thankfully, standards organizations like the W3C (World-Wide Web Consortium)
and ISO (International Organization for Standards) began to get involved, to
bring some order to the chaos, and make life simpler for everyone. And that
goal is being realized, but is not yet fully realized. So, between "legacy"
HTML, and the various flavors of browsers, perhaps most notably IE 6, which
has long outlived its heyday, soon to be replaced by the standards-based
IE7, which has been delayed for entirely too long, we have an "absolute
nightmare" involved in doing layout that looks more or less the same in the
major browsers.

HTML started off rather simply, with not much thought in the way of fancy
layout, and the use of an ever-expanding list of inline attributes to handle
layout properties. In the beginning, HTML was laid out in a "flow layout" in
which various elements simply appeared in the browser in the order in which
they existed in the markup language, some on new lines, and some inline.
This was an increasingly troublesome situation. The first solution was the
use of HTML tables to provide enhanced layout capabilities. But this was
only a partial solution, and not extremely well-thought-out. Tables still
used inline markup and were limited to a tabular format.

The advent of CSS (Cascading Style Sheets) changed all that. CSS could be
written as inline style attributes, or in a single block in the head of an
HTML document, or even as an external document that was linked to HTML
elements via style names, element names, and id attributes. CSS was not
limited to a tabular format; in fact, elements could be freely positioned in
any variety of ways. Now CSS is the dominant layout methodology. But CSS is
more complex than tables. CSS elements can be positioned absolutely
(relative to the page) or relatively to other elements.

Getting back to ASP.Net now, ASP.Net was an evolution in web application
development, which started with CGI, ASP, and other similar technologies.
Microsoft decided that ASP should behave in a familiar way, and thus
introduced the concept of the "WebForm," which is intended to behave much
like a Windows Form, both to the developer and to the user. Of course, it
can't really, but it does a decent job of approximating much of the look and
feel.

Because Windows Forms use "absolute positioning" in a Form interface, the
default layout "style" of a WebForm is called "grid layout." This uses CSS
absolute positioning. However, because a browser with HTML is not a Windows
Form application, and browsers are all different, well, it is only partially
successful. WebControls and HtmlControls are actually server-side classes
that present themselves as HTML elements or combinations thereof on the
client browser.

Bottom line is, there are 2 basic paths you can take, and each has its
plusses and minuses. You can use "flow layout" and HTML tables, which is
simpler, but less flexible and extensible, or you can use "grid layout" and
absolute positioning. Or, you can mix and match. But in any case, you're
going to have to learn a good bit more about HTML, JavaScript and CSS to get
any good at it. And test in a variety of browsers, screen resolutions, etc.

Jun 15 '06 #3

P: n/a
Thank you for your time

Samuel

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:uZ**************@TK2MSFTNGP05.phx.gbl...
Hi Samuel,

As an admitted newbie, I can certainly see why you would call the
positioning issue an "absolute nightmare." In fact, it is a nightmare for
many of us, and no piece of cake to those of us with quite a bit of
experience. And I wish I had some simple rules for you to follow. But
there are none. I'm going to start from the beginning, and please forgive
me if I tell you anything you already know.

ASP.Net is a technology for developing web applications. A web application
is an application in which the vast majority of the programming is on a
server machine, but the user interface is presented via a "thin-client"
HTML browser user interface.

I'm sure you've visited many web sites, and viewed many web pages, even as
an end-user. What I'm not sure about is if you're at all familiar with
HTML (HyperText Markup Language), which is the text-based language that
provides the display in a browser. HTML started out as an invention of the
Mosaic group, who created the first web browsers, and a language for
formatting display in those browsers. It quickly caught on, and before you
know it, there were several popular web browsers, and several different
"flavors" of HTML floating around. Things began to get complicated. There
were no standards, and the major players in the game were all trying to
outdo each other with browsers that did more, which meant creating HTML
that enabled browsers to do more. Thus began the infamous "browser wars"
not so long ago, in a galaxy not so far away.

Thankfully, standards organizations like the W3C (World-Wide Web
Consortium) and ISO (International Organization for Standards) began to
get involved, to bring some order to the chaos, and make life simpler for
everyone. And that goal is being realized, but is not yet fully realized.
So, between "legacy" HTML, and the various flavors of browsers, perhaps
most notably IE 6, which has long outlived its heyday, soon to be replaced
by the standards-based IE7, which has been delayed for entirely too long,
we have an "absolute nightmare" involved in doing layout that looks more
or less the same in the major browsers.

HTML started off rather simply, with not much thought in the way of fancy
layout, and the use of an ever-expanding list of inline attributes to
handle layout properties. In the beginning, HTML was laid out in a "flow
layout" in which various elements simply appeared in the browser in the
order in which they existed in the markup language, some on new lines, and
some inline. This was an increasingly troublesome situation. The first
solution was the use of HTML tables to provide enhanced layout
capabilities. But this was only a partial solution, and not extremely
well-thought-out. Tables still used inline markup and were limited to a
tabular format.

The advent of CSS (Cascading Style Sheets) changed all that. CSS could be
written as inline style attributes, or in a single block in the head of an
HTML document, or even as an external document that was linked to HTML
elements via style names, element names, and id attributes. CSS was not
limited to a tabular format; in fact, elements could be freely positioned
in any variety of ways. Now CSS is the dominant layout methodology. But
CSS is more complex than tables. CSS elements can be positioned absolutely
(relative to the page) or relatively to other elements.

Getting back to ASP.Net now, ASP.Net was an evolution in web application
development, which started with CGI, ASP, and other similar technologies.
Microsoft decided that ASP should behave in a familiar way, and thus
introduced the concept of the "WebForm," which is intended to behave much
like a Windows Form, both to the developer and to the user. Of course, it
can't really, but it does a decent job of approximating much of the look
and feel.

Because Windows Forms use "absolute positioning" in a Form interface, the
default layout "style" of a WebForm is called "grid layout." This uses CSS
absolute positioning. However, because a browser with HTML is not a
Windows Form application, and browsers are all different, well, it is only
partially successful. WebControls and HtmlControls are actually
server-side classes that present themselves as HTML elements or
combinations thereof on the client browser.

Bottom line is, there are 2 basic paths you can take, and each has its
plusses and minuses. You can use "flow layout" and HTML tables, which is
simpler, but less flexible and extensible, or you can use "grid layout"
and absolute positioning. Or, you can mix and match. But in any case,
you're going to have to learn a good bit more about HTML, JavaScript and
CSS to get any good at it. And test in a variety of browsers, screen
resolutions, etc.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

A lifetime is made up of
Lots of short moments.

"Samuel Shulman" <sa************@ntlworld.com> wrote in message
news:eF**************@TK2MSFTNGP02.phx.gbl...
I am looking for good guidance for positioning controls on the
form.document, it is absolute nightmare and I don't know where to begin

Thank you,
Samuel Shulman


Jun 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.