Tables use 5 tags for hierarchical structure whereas Layer just uses 1 tag for everything
Div Layers provide better control over formatting and layout
Formatting Via Layers
Formatting via layers is based on the idea of nesting layers
Each layer can be viewed as an independent region that can hold any XHTML content
The web page is divided into regions according to its layout
Each region is then substituted by a layer
Formatting Via Layers
Frames
Frame layout and design
Frame sets and nesting
Using frames
Target frames and windows
Frames
Web pages that do not use tables, layers or frames tend to be left-side heavy
Frames divide a browser window into regions, with each region having its own web page
When a surfer clicks on a link, from a set of links, the browser displays the corresponding HTML file in a new web page, which may not have the same links, for further navigation – frames solve this
Frame Layout & Design
A frame is a rectangle that has a width and height, a location in a browser window, and content
A collection of frames is referred to as a frame set. It controls the layout of its frames
A frameset and a frame are created using the <frameset> and <frame> tags (+ <noframes> )
The <frameset> tag replaces <body> tag
Frame Layout & Design
Useful tips:
Keep the frameset simple
Keep the frame’s content short
Keep the frames organised – use a driver frame
Frame Sets & Nesting
A frame set width is defined by number of columns, cols
A frame set height is defined by number of rows, rows
Units of rows and cols can be pixels or percentage of browser window
Frame Sets & Nesting
Frame Sets & Nesting
Frame Sets & Nesting
XHTML does not have a limit on the depth of frame nesting
However, one or two levels of nesting is all that is needed in practice
0 comments
Post a comment