layout best practices


E

ebjerke

I am totally new to web design. I have perused numerous articles,
websites, and books to try to grasp Frontpage 2003, which I plan to
purchase soon (I currently have a 30-day evaluation copy). I believe
that I am familiar with most of the pros and cons in using layout
tables, frames, or layers to design my site. There are a couple of
things, however, that I feel particularly shakey on in my
understanding:

1. If I have a centered layout table as my page's main border and then
use a layer somewhere in that table, will the layer always be in the
same spot relative to the table or will that change depending on the
user's browser or screen size? If so, should I just use layers only to
do the layout since they have absolute positioning? How can I make sure
that the bottom layer that I am using for the base is centered in all
browsers or screens?

2. When messing with layers for my layout, I noticed that it is
difficult to line them up perfectly if you want, say, a banner at the
top of a page. If a top layer appears to me in design view to
completely cover and align with the base layer, can I be confident that
they will look that way on everyone's computer?

I guess that is all for now. Thanks to all in advance. I have really
been trying to understand this stuff and am alternately excited and
frustrated as I make progress and then seem to just find more things i
don't get,
 
Ad

Advertisements

M

Murray

1. If I have a centered layout table as my page's main border and then
use a layer somewhere in that table

Never put layers (or any absolutely positioned elements) directly into table
cells.
will the layer always be in the
same spot relative to the table

It should always be positioned relative to the upper-left-hand corner of its
nearest positioned ancestor. Some browsers interpret this differently than
others when the absolutely positioned element is inside a table, hence, the
recommendation above.
If so, should I just use layers only to
do the layout since they have absolute positioning?

You should not put text content into layers, because of the impact of the
layers being removed from the normal flow of the code on the page. If you
do, and the visitor resizes the text, the layer containing it will expand,
and overflow other content on the page without pushing it aside - thus you
have a big mess.
How can I make sure
that the bottom layer that I am using for the base is centered in all
browsers or screens?

Bottom layer? Anyhow, to center any absolutely positioned element, all you
have to do is to place it within some relatively positioned, and centering
container. It's quite simple.
2. When messing with layers for my layout, I noticed that it is
difficult to line them up perfectly if you want, say, a banner at the
top of a page. If a top layer appears to me in design view to
completely cover and align with the base layer, can I be confident that
they will look that way on everyone's computer?

It entirely depends, but using layers should NOT be used as a primary layout
method.
Thanks to all in advance. I have really
been trying to understand this stuff

I can see. Here is my sincere suggestion. Positioning is alot more complex
than first blush would reveal. For now, just stick with tables while you
are studying HTML and CSS. As you progress, integrate more CSS into your
style until you can begin to tackle the challenges of positioning with CSS.
Then you can (mostly) leave tables behind....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top