home    egovision html tutorials    tuorials home

Lesson 9. Customising Frames.

Frame Attributes.
Further manipulation of FRAMESETs allow to determine aesthetics for your site. The FRAME tag has its own attributes which can be set as follows:

scrolling=" " lets you specify whether or not you want a scroll bar on the right side of the frame you're specifying.

scrolling="no" - Forces the frame to display no scrollbar even if one is needed. Be careful with this option, if your page is too long for (say) a 800x600 screen and you set this then the visitor has no way of accessing the information that is off the bottom of the screen.

scrolling="yes" - Forces the frame to display a scrollbar at all times - even when it is not needed.

scrolling="auto" - Displays a scrollbar only when the page length exceeds the window size. Leaving the attribute out altogether has the same effect.


border=" " lets you specify the border width of the frame in pixels e.g. border ="3".


resize="no" frames can be resizes by the user by dragging the frame border across the page - set to "yes", users can resize the frame, set to "no", they can't. The default setting is "yes".

noresize not all browsers support the resize="no" attribute, it is probably best to use this as well just to make sure that all browsers are treating the frame in the same way.

marginheight=" " and marginwidth=" " lets you set the distance in pixels between the edge of the frame and its contents.

Noframes tag.
There are browsers around that do not support frames at all. In order to cater for all visitors to your site using all browsers it is useful to add the NOFRAMES tag to your FRAMESET definition document.
For example, adding this to our myframes.html file...


          <HTML>
          <HEAD>
          <TITLE>My Frame Set</TITLE>
          </HEAD>
          <FRAMESET rows="
50%,50% >
                 <FRAME SRC="fileone.html">
                      <FRAMESET cols="25%,75% >
                            <FRAME SRC="filetwo.html">
                            <FRAME SRC="fileone.html">
                      </FRAMESET >

          </FRAMESET >
          <NOFRAMES>
          Your browser does not support frames.
          </NOFRAMES>

          </HTML>


You could add in a link to another HTML page to provide an alternative for people who cannot view your framed site.

That's about it really, there is one more tutorial and although the content is useful and allows much more versatility in page layout it unfortunately isn't supported by Netscape until browser release 5 (although it is part of the HTML4 standard and works in Internet Explorers 4 & 5) Proceed to the next tutorial by all means but be prepared for the compatablilty consequences of using the content.

next lesson
 
egovision


Tutorial Site Map

HTML Resource Centre

Lesson 6
Introducing Frames
  • What are Frames?
Lesson 7
Creating a Frameset
  • Setting out frames, Basic syntax
Lesson 8
Further Frames
  • Nested Frame Sets
  • Naming Frames
  • Linking Between Frames
  • Escaping From Frames
Lesson 9
Customising Frames
  • Frame Attributes
  • NOFRAMES tag
Lesson 10
Floating Frames

(HTML4 Netscape 5 &
Microsoft Explorer ONLY)
  • IFRAME - Breif History
  • Using IFRAME