12. Frames

Embed Size (px)

Citation preview

  • 7/27/2019 12. Frames

    1/24

    Frames

    http://localhost/var/www/2007-S1/IP-ICT%201083-DSN4/mystuff/week%205/frames/frames.ppthttp://localhost/var/www/2007-S1/IP-ICT%201083-DSN4/mystuff/week%205/frames/frames.ppthttp://localhost/var/www/2007-S1/IP-ICT%201083-DSN4/mystuff/week%205/frames/frames.ppt
  • 7/27/2019 12. Frames

    2/24

    Frames

    Dividing a page, called frameset, intoframes, allow the visitor to see more

    than one page at a timeEach frame contains its own Web page,and theoretically could be viewedindependently in a separate window

    One of the disadvantage they can behard to navigate

  • 7/27/2019 12. Frames

    3/24

    Creating a Simple Frameset

    Think of a frameset as a window withindividual panes

    Each pane shows different information

    You decide how many panes your windows will have

    how its border look like

    should have scroll bars or notAssigning individual URLs to each pane, thatis, frame

  • 7/27/2019 12. Frames

    4/24

    FRAMES IN ROWS

  • 7/27/2019 12. Frames

    5/24

    Creating Frames in Columns

  • 7/27/2019 12. Frames

    6/24

    FRAMES IN COLUMNS

  • 7/27/2019 12. Frames

    7/24

    Creating Frames in Rows andColumns

  • 7/27/2019 12. Frames

    8/24

    FRAMES IN COLUMNS

  • 7/27/2019 12. Frames

    9/24

    Combining Framesets

  • 7/27/2019 12. Frames

    10/24

    COMBINING FRAMESETS

  • 7/27/2019 12. Frames

    11/24

    Creating an Inline Frame

    If you want to mix text, graphics and aframe all on one page, youll need tocreate a floating or inlineframe

  • 7/27/2019 12. Frames

    12/24

    INLINE FRAME

    COLOURS

    - colors - colors - colors - colors - colors - colors - colors - colors - colors - colors

    this part :: type the text that should appear if the browser can't display the frame

    in the

    tag and referto frame.url

  • 7/27/2019 12. Frames

    13/24

    Adjusting a Frames Margins

    All browsers display a frames contentswith a default margin from 8 to 15

    pixels on each sideYou can adjust the margin so that thereis more space, or, if you prefer, so that

    the frames contents begin in the top-left corner

  • 7/27/2019 12. Frames

    14/24

    COMBINING FRAMESETS

  • 7/27/2019 12. Frames

    15/24

    Showing or Hiding Scroll Bars

    You can decide whether each individual frame should have scroll bar allthe time, never, or only neededOnly when needed:: means that the scroll bars will appear only whenthere is more information than can be shown at one time in the frameIf the visitors makes the window big enough, these scroll bars will

    eventually disappearTo show scroll bars all the time : scrolling=yes

    To hide scroll bars all the time : scrolling=no

    To show scroll bars when needed : scrolling=auto

  • 7/27/2019 12. Frames

    16/24

    Adjusting the Color of theBorders

    In theory, you can change the color of eachframe individually

    In practice, however, since the borders areshared between frames, the possibilities aremore limited

    Unfortunately, the bordercolorattribute is

    not standard (X)HTML

  • 7/27/2019 12. Frames

    17/24

    Adjusting the Frame Borders

    By default, your visitors browser will draw sculptedborders around each frame in your frameset

    The border tag lets you control the width of the

    space between framesThe frameborder tag lets you choose to fill thatspace with sculpted borders or leave it blank

    To hide the sculpted borders:

  • 7/27/2019 12. Frames

    18/24

    Keeping Visitors from ResizingFrames

    Frames with relative or variable sizesare always resized when the visitor

    changes the size of the browser windowHowever, you can also choose whetherto let the visitor resize the individualframes

    To keep visitor from resizing yourframe:

  • 7/27/2019 12. Frames

    19/24

    Targeting Links to ParticularFrames

    You can have other pages appear in thesame frame

    The trick is to add a pointer, called atarget, to the links to those pages

    The target says open this link in the

    photosframe

  • 7/27/2019 12. Frames

    20/24

    COMBINING FRAMESETS

    YELLOW

    text - text - text - text - text - text - text - text - text - text

    blue

    green

    red

    purple

  • 7/27/2019 12. Frames

    21/24

    Targeting Links to SpecialSpots

    You will want to make more generalinstructions, like having the link open on anew window.There are 4 special target names:

  • 7/27/2019 12. Frames

    22/24

    Changing the Default Target

    In a frame contains a link, the link willopen up in the same frame, by default,

    unless you change the targetYou can change the default target forall the links on a page by using the

    base tag

  • 7/27/2019 12. Frames

    23/24

    YELLOW

    text - text - text - text - text - text - text - text - text - text

    blue

    green

    red

    purple

    YELLOW

    text - text - text - text - text - text - text - text - text - text

    blue

    green

    red

    purple

  • 7/27/2019 12. Frames

    24/24

    Nesting Framesets

    As if frames andframesets werentcomplicated enough,you can nestframesets inside of

    frames to achievespecial effectsBuild the inner frame==

    combiningfra

    mesets.htmBuild the outerframeset ==

    "Winter.htm"

    NESTING FRAMESETS