|
Home > Archive > dBASE Web Applications > January 2006 > Multiple Tables across a Web Page
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Multiple Tables across a Web Page
|
|
| Dean Watson 2005-12-30, 7:23 am |
| I am sure this is not as hard as I am trying to make it, so would appreciate
some Pearls of Wisdom! How can I lay-out a Web Page with multiple tables
across 1 part of it? Or alternatively, how can I have borders around some of
the collumns and not others?
TIA, Dean.
| |
| Claus Mygind 2005-12-30, 9:23 am |
| Dean you have several options.
1. you can use a different HTML table for each database file. Then set the
border property of the table you want to have lines around like this: Also
within the each table you can set the border or cell color for each cell
look at same example below
<TABLE border="1">
<TR>
<TD bordercolor="green"></TD>
<TD bgcolor="#FF0000"></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
</TR>
</TABLE>
<TABLE>
<TR>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD></TD>
<TD></TD>
</TR>
</TABLE>
2. But I am sure that is not what you were asking about. You propbably
wanted the information to be side by side. In that case you will need to
use Cascading Style Sheets. That will allow you to map out different areas
of the screen like this: In this example you put the style information in
the html page header. Then apply the style to the html page using the
<div> </div> tags. by the way there 3 different ways to use style
information. In the header, in the body or call an outside file. I am just
giving you one example.
function StreamHeader
with (this.fOut)
puts('Content-type: text/html')
puts('')
puts('<HTML>')
puts('')
puts('<HEAD>')
puts('')
puts('<TITLE> Your Title </TITLE>')
puts('')
puts('<style type="text/css">')
puts('<!--')
puts(' #MenuBar {')
puts(' position: fixed; ')
puts(' white-space: nowrap;')
puts(' top: 0px; left: 1px; ')
puts(' width: 99%;')
puts(' background-color: #CCFFFF; ')
puts(' color: black;')
puts(' border: #0000FF solid 1px;')
puts(' padding-left: 10px;')
puts(' z-index: 99;')
puts(' }')
puts('#UpperLeft {')
puts(' position: absolute;')
puts(' white-space: nowrap; ')
puts(' left: 0%; ')
puts(' top: 25px;')
puts(' width: 49%;')
puts(' color: #333333;')
puts(' padding:3px;')
puts(' font-size: 10pt;')
puts(' overflow: hidden;')
puts(' z-index: 2;')
puts(' }')
puts('#UpperRight {')
puts(' position: absolute;')
puts(' white-space: nowrap; ')
puts(' left: 51%; ')
puts(' top: 25px;')
puts(' width: 48%;')
puts(' background-color: #FFCCCC;')
puts(' color: #333333; ')
puts(' padding:3px;')
puts(' font-size: 10pt;')
puts(' overflow: hidden;')
puts(' z-index: 1;')
puts(' }')
puts('#CenterMiddle {')
puts(' position: absolute;')
puts(' white-space: nowrap; ')
puts(' top: 230px;')
puts(' width: 98%;')
puts(' color: #333333; ')
puts(' padding:3px;')
puts(' font-size: 10pt;')
puts(' overflow: hidden;')
puts(' z-index: 1;')
puts(' }')
puts('#BottomLeft {')
puts(' position: absolute;')
puts(' white-space: nowrap; ')
puts(' left: 0%; ')
puts(' top: 435px;')
puts(' width: 49%;')
puts(' color: #333333;')
puts(' padding:3px;')
puts(' font-size: 10pt;')
puts(' overflow: hidden;')
puts(' z-index: 2;')
puts(' }')
puts('#BottomRight {')
puts(' position: absolute;')
puts(' white-space: nowrap; ')
puts(' left: 51%; ')
puts(' top: 435px;')
puts(' width: 48%;')
puts(' color: #333333; ')
puts(' padding:3px;')
puts(' font-size: 10pt;')
puts(' overflow: hidden;')
puts(' z-index: 1;')
puts(' }')
puts(' .MenuButtonText {font-size: 8pt;}')
puts(' .InputText {font-size: 8pt;}')
puts(' .ReadOnlyText {font-size: 7pt;')
puts(' color: #FFFF00;')
puts(' background-color: #009999}')
puts('-->')
puts('</style>')
puts(' </HEAD>')
endwith
function streamBody
puts([<BODY >])
puts([<FORM ]
puts([ METHOD=POST ]
puts([ ACTION="" ]
puts([ NAME="f1"]
puts([ >]
puts([]
puts([div id="MenuBar" nowrap="nowrap">]
//this is a small region not room for much
puts([<INPUT ')
puts([ TYPE="submit" ])
//note the use of style to the text size here
puts([ class="MenuButtonText" ])
puts([ name="submit" ])
puts([ value="Submit" ])
puts([>])
puts([/div>]
//end Menu bar
puts('<div id="UpperLeft" nowrap="nowrap">')
// put one of your tables in this region
//this works well with FireFox (example of a disabled field)
puts([ <INPUT ])
puts([ TYPE="text" ])
puts([ NAME="NAME" ])
puts([ value="What ever" ])
puts([ size="47" ])
puts([ CLASS="ReadOnlyText"])
/*
internet explorer uses the word "disabled" instead of readonly. so some
additional code would have to be added here to check for which type of
browser is reading your program. But that is not what you are asking about
so I will leave that out. Just wanted to give you an example of how you can
manipulate the style of the input fields also.
*/
puts([ readonly ])
puts([ tabindex="-1" ])
puts([ />])
puts([ </TD>])
puts([/div>]
puts([<div id="UpperRight" nowrap="nowrap">])
// put another here of your tables in this region
puts([/div>]
puts([<div id="CenterMiddle" align="center" nowrap="nowrap">])
puts([/div>]
puts('<div id="BottomLeft" nowrap="nowrap">')
puts([/div>]
puts('<div id="BottomRight" nowrap="nowrap">')
puts([/div>]
puts([</FORM>])
puts([</BODY>])
puts([</HTML>])
endwith
return true
endClass
you can play with the properties of these different regions like color,
text style etc. The neat thing about this layout is in FireFox the menu bar
stays at the top of the screen while the user scrolls down the page. so if
you want your form's submit button to always be visible it will be (This
feature does not work for MS Internet Explorer)
Claus
"Dean Watson" <dean.watson@telesavers.com.au> wrote in message
news:0FC9EWSDGHA.580@news-server...
>I am sure this is not as hard as I am trying to make it, so would
>appreciate
> some Pearls of Wisdom! How can I lay-out a Web Page with multiple tables
> across 1 part of it? Or alternatively, how can I have borders around some
> of
> the collumns and not others?
>
> TIA, Dean.
>
>
| |
| Dean Watson 2006-01-02, 8:23 pm |
| Thanks for the advice Claus,
Looks like I will have to get into Style Sheets.
Regards, Dean.
"Claus Mygind" <cmygind@tsccorp.com> wrote in message
news:FpC2zsUDGHA.1300@news-server...
> Dean you have several options.
>
| |
| Claus Mygind 2006-01-03, 7:23 am |
| Dean,
Thanks for the update report.
If you do not already have a reference book, I would recommend the
following:
"The Complete Reference HTML & XHTML " Fourth Edition or later. by Thomas
A. Powell from McGrawHill Osborne
It covers HTML, XHTML, CSS1 and CSS2. It tells you what is unique to
Internet Explorer and what can be used by all browsers. That way there is
no guessing what properties and events that can be maniputlated by each
element.
Claus
|
|
|
|
|