~Welcome to My Homework Pages~

Heading image.HTML 201 Frames -Lesson Three   page 1

Customizing Your Frame
So far lessons have covered how to create frames and link them together, that is the toughest part. Now to customise your frame, with a few simple commands.

Frame tags and attributes:
<frameset>
This is the main container for a Frame. It has 2 required attributes-rows and cols. A frame
document has no body, and no tags that would normally be placed in the body can appear before the frameset tag, or the frameset will be ignored. The frameset tag has a matching end tag, and within the frameset you can only have other nested frameset tags, frame tags, or the noframes tag.

rows="value"
These values can be absolute pixel values or percentage values between 1 and 100.
 value - pixels
A simple numeric value is assumed to be a fixed size in pixels. This is the most dangerous type of value to use by itself since the size of the viewer's window can and does vary substantially. If fixed pixel values are used, it will almost certainly be necessary to mix them with one or more of the relative size values described below. Otherwise the client engine will likely override your specified pixel value to ensure that the total proportions of the frame are 100% of the width and height of the user's window.
value - %
This is a simple percentage value between 1 and 100. If the total is greater than 100 all percentages are scaled down. If the total is less than 100, and relative-sized frames exist, extra space
To MelsGraphics.com

 

value - *
The value on this field is optional. A single '*' character is a "relative-sized" frame and
is interpreted as a request to give the frame all remaining space. If there exist
multiple relative-sized frames, the remaining space is divided evenly among them. If there is a value in front of the '*', that frame gets that much more relative space.
"2*,*" would give 2/3 of the space to the first frame, and 1/3 to the second.
        Example for 3 rows, the first and the last being smaller than the center row:
        <frameset rows="20%,60%,20%">
        Example for 3 rows, the first and the last being fixed height, with the remaining
        space assigned to the middle row <frameset rows="100,*,100">
cols="value "
The cols uses the exact same syntax as the list described above for the rows attribute.
frameborder=" "
This attribute provides the user with information about the frame border. Possible values:

"1" - This value tells the user agent to draw a separator between this frame and every adjoining frame. This is the default value and browsers will automatically install a border unless you tell it not to.

Paint dripping

"0" - This value tells the user agent not to draw a separator between this frame and every adjoining frame and will not work for both IE and Netscape. I prefer to use the <border="0"> attribute like used in the following format ~ (<frameset cols="160,*" border="0">. This works for both IE and Netscape to eliminate the frame border. You can also change the default frame border color to any that you wish. Sample code for this is:
<frameset rows="80,*" bordercolor="#A00E0E">

<frame>
This tag defines a single frame in a frameset. It has 6 possible attributes: src, name, marginwidth, marginheight, scrolling, and noresize. The frame tag is not a container so it has no matching end tag.

Next page.

~ I Love Learning ~

Html 201-Tables Lessons Html 101 Lessons WebTech University Html 201-Frames Lessons Html 201-Forms Lessons

 

Paint dripping