473,378 Members | 1,470 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Layout basics

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
3 1525
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Wilhelm Kutting | last post by:
I want to use the following layout: HEADER ------------------------- LEFT | RIGHT | Blue | Grey | |
16
by: Dan V. | last post by:
How do you do a css 2 column layout with header and footer, with the 2nd column auto-stretching so entire page looks good for 800 x 600 resolution as min. and 1024 x 768 resolution as a max? ...
2
by: Anargyros L. Papadopoulos | last post by:
given: class A { // ... }; class B : public class A { // ... } void some_fun()
30
by: Diane Wilson | last post by:
I'm trying (once again) to figure out how to make a robust CSS layout style that can replace tables. I'd like to be able to do a basic two-column layout, with a one-column header, a two column...
8
by: Fabrizio Magni | last post by:
Hello, I'm a newbie with DB2 and I'd like to know if a standardized layout exists for planning a proper installation. I'm referring to something similar to OFA for Oracle. I couldn't find...
10
by: Luke | last post by:
Hi. I am trying to make correct layout, here is an example of (dynamically generated content via jsp): http://localhost/www/layout.htm Most outer div is positioned absolute (if not then it...
4
by: Rob | last post by:
I am just venturing into the world of pure CSS layouts. Although I am enjoying it so far, I have come across an issue that really has me stumped. The main body of my page is set out using a...
10
by: sumsin | last post by:
The C++ Object Model book says that 'Nonstatic data members are allocated directly within each class object. Static data members are stored outside the individual class object. Static and...
3
by: Peskov Dmitry | last post by:
Hi, What is the memory layout of an object, and the derived object. For example : class A { private: int prv_data; protected: int pro_data;
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.