PC Review


Reply
Thread Tools Rate Thread

how to centre my web page using layers?

 
 
Daisy
Guest
Posts: n/a
 
      6th Mar 2004
i love the use of layers in fp2003 as i have lots of images and descriptions
on my pages, but how can i get them to sit in the middle of the page when
viewed at 600x800 as well as 1024x768. If i use tables alone, then i
assume i just make the table 100% to suit any view, but how to do this with
layers

any help greatly appreciated.

daisy


 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      6th Mar 2004
Daisy,
Your best way is actually to use a table. What most individuals do
now who want a centered approach is to define a table of a certain size,
most commonly about 750 (that way it fits an 800x600 monitor with room on
the side for the scrollbar), then set the table alignment to center. This
gives you the most consistant approach and also degrades nicely for non-IE
users. To do it with layers is trickier because layers tend to be defined in
absolute position or relative to an object. The best way is to get them into
the table and try to make them relative to the table cell that they're in.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"Daisy" <(E-Mail Removed)> wrote in message
news:I_j2c.92$(E-Mail Removed)...
> i love the use of layers in fp2003 as i have lots of images and

descriptions
> on my pages, but how can i get them to sit in the middle of the page when
> viewed at 600x800 as well as 1024x768. If i use tables alone, then i
> assume i just make the table 100% to suit any view, but how to do this

with
> layers
>
> any help greatly appreciated.
>
> daisy
>
>



 
Reply With Quote
 
Jon
Guest
Posts: n/a
 
      6th Mar 2004
Tables shouldn't go in layers - better to use 1 or the other. To centre a
layer(div) code would go like this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
#centerDiv {
width: 750px;
background-color: red;
margin: 0 auto;
}
</style>
<!--[if IE 5]>
<style>
body {text-align: center;}
#centerDiv {text-align left;}
</style>
<![endif]-->
</head>
<body>
<div id="centerDiv">
This div will be centred 750px wide
</div>

A couple of notes you must have a full doctype on the page for this to work,
also keep the conditional comment for IE5 support as IE5 doesn't support
margin:auto so we need to work around

Jon
Microsoft MVP - FP


Mark Fitzpatrick wrote:
> Daisy,
> Your best way is actually to use a table. What most
> individuals do now who want a centered approach is to define a table
> of a certain size, most commonly about 750 (that way it fits an
> 800x600 monitor with room on the side for the scrollbar), then set
> the table alignment to center. This gives you the most consistant
> approach and also degrades nicely for non-IE users. To do it with
> layers is trickier because layers tend to be defined in absolute
> position or relative to an object. The best way is to get them into
> the table and try to make them relative to the table cell that
> they're in.
>
> Hope this helps,
> Mark Fitzpatrick
> Microsoft MVP - FrontPage
>
> "Daisy" <(E-Mail Removed)> wrote in message
> news:I_j2c.92$(E-Mail Removed)...
>> i love the use of layers in fp2003 as i have lots of images and
>> descriptions on my pages, but how can i get them to sit in the
>> middle of the page when viewed at 600x800 as well as 1024x768. If
>> i use tables alone, then i assume i just make the table 100% to suit
>> any view, but how to do this with layers
>>
>> any help greatly appreciated.
>>
>> daisy



 
Reply With Quote
 
chris leeds
Guest
Posts: n/a
 
      6th Mar 2004
absolutely!
I struggled with all that table-less stuff for weeks and never felt it was
"ready for prime time". there were limitations that were too difficult to
try to overcome.
at least with the tables your layout is iron-clad and you've got all these
<td>'s to class and id. ;-)
IMHO

--
The email address on this posting is a "black hole". I got tired of all the
spam.
Please feel free to contact me here:
http://nedp.net/contact/
--


"Mark Fitzpatrick" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Daisy,
> Your best way is actually to use a table. What most individuals do
> now who want a centered approach is to define a table of a certain size,
> most commonly about 750 (that way it fits an 800x600 monitor with room on
> the side for the scrollbar), then set the table alignment to center. This
> gives you the most consistant approach and also degrades nicely for non-IE
> users. To do it with layers is trickier because layers tend to be defined

in
> absolute position or relative to an object. The best way is to get them

into
> the table and try to make them relative to the table cell that they're in.
>
> Hope this helps,
> Mark Fitzpatrick
> Microsoft MVP - FrontPage
>
> "Daisy" <(E-Mail Removed)> wrote in message
> news:I_j2c.92$(E-Mail Removed)...
> > i love the use of layers in fp2003 as i have lots of images and

> descriptions
> > on my pages, but how can i get them to sit in the middle of the page

when
> > viewed at 600x800 as well as 1024x768. If i use tables alone, then i
> > assume i just make the table 100% to suit any view, but how to do this

> with
> > layers
> >
> > any help greatly appreciated.
> >
> > daisy
> >
> >

>
>



 
Reply With Quote
 
Jon
Guest
Posts: n/a
 
      6th Mar 2004
meant to say this the other way around - layers shouldn't go in tables :-)

Jon
Jon wrote:
> Tables shouldn't go in layers - better to use 1 or the other. To
> centre a layer(div) code would go like this
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <style type="text/css">
> #centerDiv {
> width: 750px;
> background-color: red;
> margin: 0 auto;
> }
> </style>
> <!--[if IE 5]>
> <style>
> body {text-align: center;}
> #centerDiv {text-align left;}
> </style>
> <![endif]-->
> </head>
> <body>
> <div id="centerDiv">
> This div will be centred 750px wide
> </div>
>
> A couple of notes you must have a full doctype on the page for this
> to work, also keep the conditional comment for IE5 support as IE5
> doesn't support margin:auto so we need to work around
>
> Jon
> Microsoft MVP - FP
>
>
> Mark Fitzpatrick wrote:
>> Daisy,
>> Your best way is actually to use a table. What most
>> individuals do now who want a centered approach is to define a table
>> of a certain size, most commonly about 750 (that way it fits an
>> 800x600 monitor with room on the side for the scrollbar), then set
>> the table alignment to center. This gives you the most consistant
>> approach and also degrades nicely for non-IE users. To do it with
>> layers is trickier because layers tend to be defined in absolute
>> position or relative to an object. The best way is to get them into
>> the table and try to make them relative to the table cell that
>> they're in.
>>
>> Hope this helps,
>> Mark Fitzpatrick
>> Microsoft MVP - FrontPage
>>
>> "Daisy" <(E-Mail Removed)> wrote in message
>> news:I_j2c.92$(E-Mail Removed)...
>>> i love the use of layers in fp2003 as i have lots of images and
>>> descriptions on my pages, but how can i get them to sit in the
>>> middle of the page when viewed at 600x800 as well as 1024x768. If
>>> i use tables alone, then i assume i just make the table 100% to suit
>>> any view, but how to do this with layers
>>>
>>> any help greatly appreciated.
>>>
>>> daisy



 
Reply With Quote
 
Crash Gordon
Guest
Posts: n/a
 
      6th Mar 2004
so much for progress huh.



"chris leeds" <(E-Mail Removed)> wrote in message news:#(E-Mail Removed)...
| absolutely!
| I struggled with all that table-less stuff for weeks and never felt it was
| "ready for prime time". there were limitations that were too difficult to
| try to overcome.
| at least with the tables your layout is iron-clad and you've got all these
| <td>'s to class and id. ;-)
| IMHO
|
| --
| The email address on this posting is a "black hole". I got tired of all the
| spam.
| Please feel free to contact me here:
| http://nedp.net/contact/
| --
|
|
| "Mark Fitzpatrick" <(E-Mail Removed)> wrote in message
| news:(E-Mail Removed)...
| > Daisy,
| > Your best way is actually to use a table. What most individuals do
| > now who want a centered approach is to define a table of a certain size,
| > most commonly about 750 (that way it fits an 800x600 monitor with room on
| > the side for the scrollbar), then set the table alignment to center. This
| > gives you the most consistant approach and also degrades nicely for non-IE
| > users. To do it with layers is trickier because layers tend to be defined
| in
| > absolute position or relative to an object. The best way is to get them
| into
| > the table and try to make them relative to the table cell that they're in.
| >
| > Hope this helps,
| > Mark Fitzpatrick
| > Microsoft MVP - FrontPage
| >
| > "Daisy" <(E-Mail Removed)> wrote in message
| > news:I_j2c.92$(E-Mail Removed)...
| > > i love the use of layers in fp2003 as i have lots of images and
| > descriptions
| > > on my pages, but how can i get them to sit in the middle of the page
| when
| > > viewed at 600x800 as well as 1024x768. If i use tables alone, then i
| > > assume i just make the table 100% to suit any view, but how to do this
| > with
| > > layers
| > >
| > > any help greatly appreciated.
| > >
| > > daisy
| > >
| > >
| >
| >
|
|
 
Reply With Quote
 
chris leeds
Guest
Posts: n/a
 
      6th Mar 2004
don't get me wrong, I wouldn't do a site and NOT use a style sheet. it's
just that I can't see much (I know about the semantic markup and
accessibility) that would make me abandon the solidity of tables. plus
tables give you plenty of good opportunities to style large blocks of
content just because of their structure.

--
The email address on this posting is a "black hole". I got tired of all the
spam.
Please feel free to contact me here:
http://nedp.net/contact/
--


"Crash Gordon" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
so much for progress huh.



"chris leeds" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
| absolutely!
| I struggled with all that table-less stuff for weeks and never felt it was
| "ready for prime time". there were limitations that were too difficult to
| try to overcome.
| at least with the tables your layout is iron-clad and you've got all these
| <td>'s to class and id. ;-)
| IMHO
|
| --
| The email address on this posting is a "black hole". I got tired of all
the
| spam.
| Please feel free to contact me here:
| http://nedp.net/contact/
| --
|
|
| "Mark Fitzpatrick" <(E-Mail Removed)> wrote in message
| news:(E-Mail Removed)...
| > Daisy,
| > Your best way is actually to use a table. What most individuals
do
| > now who want a centered approach is to define a table of a certain size,
| > most commonly about 750 (that way it fits an 800x600 monitor with room
on
| > the side for the scrollbar), then set the table alignment to center.
This
| > gives you the most consistant approach and also degrades nicely for
non-IE
| > users. To do it with layers is trickier because layers tend to be
defined
| in
| > absolute position or relative to an object. The best way is to get them
| into
| > the table and try to make them relative to the table cell that they're
in.
| >
| > Hope this helps,
| > Mark Fitzpatrick
| > Microsoft MVP - FrontPage
| >
| > "Daisy" <(E-Mail Removed)> wrote in message
| > news:I_j2c.92$(E-Mail Removed)...
| > > i love the use of layers in fp2003 as i have lots of images and
| > descriptions
| > > on my pages, but how can i get them to sit in the middle of the page
| when
| > > viewed at 600x800 as well as 1024x768. If i use tables alone, then i
| > > assume i just make the table 100% to suit any view, but how to do this
| > with
| > > layers
| > >
| > > any help greatly appreciated.
| > >
| > > daisy
| > >
| > >
| >
| >
|
|


 
Reply With Quote
 
Crash Gordon
Guest
Posts: n/a
 
      6th Mar 2004
i don't understand css yet, so it's tables fer me...also im still using 2002


"chris leeds" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
| don't get me wrong, I wouldn't do a site and NOT use a style sheet. it's
| just that I can't see much (I know about the semantic markup and
| accessibility) that would make me abandon the solidity of tables. plus
| tables give you plenty of good opportunities to style large blocks of
| content just because of their structure.
|
| --
| The email address on this posting is a "black hole". I got tired of all the
| spam.
| Please feel free to contact me here:
| http://nedp.net/contact/
| --
|
|
| "Crash Gordon" <(E-Mail Removed)> wrote in message
| news:#(E-Mail Removed)...
| so much for progress huh.
|
|
|
| "chris leeds" <(E-Mail Removed)> wrote in message
| news:#(E-Mail Removed)...
| | absolutely!
| | I struggled with all that table-less stuff for weeks and never felt it was
| | "ready for prime time". there were limitations that were too difficult to
| | try to overcome.
| | at least with the tables your layout is iron-clad and you've got all these
| | <td>'s to class and id. ;-)
| | IMHO
| |
| | --
| | The email address on this posting is a "black hole". I got tired of all
| the
| | spam.
| | Please feel free to contact me here:
| | http://nedp.net/contact/
| | --
| |
| |
| | "Mark Fitzpatrick" <(E-Mail Removed)> wrote in message
| | news:(E-Mail Removed)...
| | > Daisy,
| | > Your best way is actually to use a table. What most individuals
| do
| | > now who want a centered approach is to define a table of a certain size,
| | > most commonly about 750 (that way it fits an 800x600 monitor with room
| on
| | > the side for the scrollbar), then set the table alignment to center.
| This
| | > gives you the most consistant approach and also degrades nicely for
| non-IE
| | > users. To do it with layers is trickier because layers tend to be
| defined
| | in
| | > absolute position or relative to an object. The best way is to get them
| | into
| | > the table and try to make them relative to the table cell that they're
| in.
| | >
| | > Hope this helps,
| | > Mark Fitzpatrick
| | > Microsoft MVP - FrontPage
| | >
| | > "Daisy" <(E-Mail Removed)> wrote in message
| | > news:I_j2c.92$(E-Mail Removed)...
| | > > i love the use of layers in fp2003 as i have lots of images and
| | > descriptions
| | > > on my pages, but how can i get them to sit in the middle of the page
| | when
| | > > viewed at 600x800 as well as 1024x768. If i use tables alone, then i
| | > > assume i just make the table 100% to suit any view, but how to do this
| | > with
| | > > layers
| | > >
| | > > any help greatly appreciated.
| | > >
| | > > daisy
| | > >
| | > >
| | >
| | >
| |
| |
|
|
 
Reply With Quote
 
Daisy
Guest
Posts: n/a
 
      7th Mar 2004
thanks everyone, suppose ill have to continue using tables. i do find them
a pain though and a bit restrictive on the creative side. I mightl try the
idea of creating a table and then using relative positioning of layers to
see what happens.

As a second thought, i suppose i could import the page into Dreamweaver and
then convert layers to tables and then set the properties of the table to be
centred and a set size and then either keep the web page like that or even
convert the page back to layers in case i want to amend them later!!
Phew! - i think ill just stick to tables.

Thanks

Daisy


"Crash Gordon" <(E-Mail Removed)> wrote in message
news:OQz%23y%(E-Mail Removed)...
i don't understand css yet, so it's tables fer me...also im still using 2002


"chris leeds" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
| don't get me wrong, I wouldn't do a site and NOT use a style sheet. it's
| just that I can't see much (I know about the semantic markup and
| accessibility) that would make me abandon the solidity of tables. plus
| tables give you plenty of good opportunities to style large blocks of
| content just because of their structure.
|
| --
| The email address on this posting is a "black hole". I got tired of all
the
| spam.
| Please feel free to contact me here:
| http://nedp.net/contact/
| --
|
|
| "Crash Gordon" <(E-Mail Removed)> wrote in message
| news:#(E-Mail Removed)...
| so much for progress huh.
|
|
|
| "chris leeds" <(E-Mail Removed)> wrote in message
| news:#(E-Mail Removed)...
| | absolutely!
| | I struggled with all that table-less stuff for weeks and never felt it
was
| | "ready for prime time". there were limitations that were too difficult
to
| | try to overcome.
| | at least with the tables your layout is iron-clad and you've got all
these
| | <td>'s to class and id. ;-)
| | IMHO
| |
| | --
| | The email address on this posting is a "black hole". I got tired of all
| the
| | spam.
| | Please feel free to contact me here:
| | http://nedp.net/contact/
| | --
| |
| |
| | "Mark Fitzpatrick" <(E-Mail Removed)> wrote in message
| | news:(E-Mail Removed)...
| | > Daisy,
| | > Your best way is actually to use a table. What most
individuals
| do
| | > now who want a centered approach is to define a table of a certain
size,
| | > most commonly about 750 (that way it fits an 800x600 monitor with room
| on
| | > the side for the scrollbar), then set the table alignment to center.
| This
| | > gives you the most consistant approach and also degrades nicely for
| non-IE
| | > users. To do it with layers is trickier because layers tend to be
| defined
| | in
| | > absolute position or relative to an object. The best way is to get
them
| | into
| | > the table and try to make them relative to the table cell that they're
| in.
| | >
| | > Hope this helps,
| | > Mark Fitzpatrick
| | > Microsoft MVP - FrontPage
| | >
| | > "Daisy" <(E-Mail Removed)> wrote in message
| | > news:I_j2c.92$(E-Mail Removed)...
| | > > i love the use of layers in fp2003 as i have lots of images and
| | > descriptions
| | > > on my pages, but how can i get them to sit in the middle of the page
| | when
| | > > viewed at 600x800 as well as 1024x768. If i use tables alone, then
i
| | > > assume i just make the table 100% to suit any view, but how to do
this
| | > with
| | > > layers
| | > >
| | > > any help greatly appreciated.
| | > >
| | > > daisy
| | > >
| | > >
| | >
| | >
| |
| |
|
|


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Layers?: Compact or compounding layers to table and cells =?Utf-8?B?TWltaSBU?= Microsoft Frontpage 2 18th Nov 2006 12:06 PM
Layers in Front Page Allison Microsoft Frontpage 12 27th Sep 2006 01:27 AM
Centering Layers on a page? =?Utf-8?B?ZmFybWRvZw==?= Microsoft Frontpage 2 19th May 2006 03:27 PM
turn web page picture layers on/off =?Utf-8?B?UmVu?= Microsoft Frontpage 6 10th Feb 2006 12:52 AM
print copies are not in centre of page,. it goes to the right of page ronald isaacs Windows XP Print / Fax 0 24th Sep 2004 06:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:16 PM.