Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture on: Frames. FRAMES VERSUS TABLES Frames allow part of the page, usually a navigation bar, to stay put.

Similar presentations


Presentation on theme: "Lecture on: Frames. FRAMES VERSUS TABLES Frames allow part of the page, usually a navigation bar, to stay put."— Presentation transcript:

1 Lecture on: Frames

2 FRAMES VERSUS TABLES Frames allow part of the page, usually a navigation bar, to stay put

3 The Requirements to Create Frames A FRAMESET html document to create the overall layout HTML documents to fill the areas implied in the frameset document

4 Implication of frame structure A document rendered by FRAMESET displays several web pages at once FRAMESET replaces the BODY tag in your html file

5 An Annotated Example  You aren’t putting any text above the frame  This sets up your structure  in this frame the FIRST time the page is loaded <FRAME SRC=“bottomdoc.html”  Ditto  note that Frameset is a container element …by default, the screen will split equally between your documents

6 FRAMESET Attributes ROWS= COLUMNS= BORDER= BORDERCOLOR=

7 ROWS AND COLUMNS Use ROWS= COLUMNS= if you don’t want screen split evenly - pixels or percentages - * -- lets HTML compute what’s left

8 BORDERS BORDER= (between pages on screen) in pixels defaults to 5 BORDERCOLOR (of frames) defaults to gray on most browsers

9 FRAME Attributes SRC= NAME= MARGINWIDTH= MARGINHEIGHT=

10 SRC SRC= where to get the html page to fill this frame If you don’t put SRC, the frame will be created but left blank

11 NAME Goes within the FRAME element NAME=“framename” By naming your frames, you make it possible to open links in them from any document anyplace on the screen

12 A more complex FRAMESET Example  splits page vertically  splits the 20% horizontally  logo in the top 15%  nav in the bottom 85% ; also names the frame so I can open links in it from elsewhere <FRAMESET ROWS=“*”  the 80% is all one row  this fills the right side

13 TARGET used with Frames Links within documents open in the current window To override this, use TARGET An example: Among my hobbies are pigs, chickens ……

14 TARGET Reserves 4 Words _BLANK loads the page into a new browser window _SELF loads the page into the current window. _PARENT loads the page into the frame next up from the frame the link is in _TOP loads the page into the full browser window.

15 Hint If you misspell the target the browser will create a new window for your link INSTEAD OF loading it in the current page

16 Minor FRAME Elements MARGINWIDTH= MARGINHEIGHT= SCROLLING=

17 Padding within Frames MARGINWIDTH= pads frames side to side MARGINHEIGHT= pads frames top to bottom Both expressed in pixels

18 The Scroll Bar SCROLLING=“auto” is the default; creates a scrollbar if page is longer than frame SCROLLING=“yes” creates a bar all the time SCROLLING=“no” suppresses the bar

19 Two Disadvantages of Frames 1.The bookmark is fixed to the controlling FRAMESET document so you can’t bookmark the contents of the frames. 2.Not every browser is frames-capable

20 The Frames-Incapable 1. Browsers older than Explorer 3.0 Navigator 2.0 2. Screen resolutions of less than 640 by 480 pixels

21 Provide an Alternative for those Browsers Before FRAMESET, code What you want them to see instead….


Download ppt "Lecture on: Frames. FRAMES VERSUS TABLES Frames allow part of the page, usually a navigation bar, to stay put."

Similar presentations


Ads by Google