Borders
& Frameborders
By default, the browser will display 5 pixel scultped
frame borders. The border attribute lets you control the space between
frames, while the frameborder attribute lets you optionally fill the
space with sculpted borders. You can choose turn borders off by setting
the border attribute to 0. You can optionally specify border colors
using the bordercolor attribute. All three attributes are used in the
frameset tag. To ensure the the frameset has no borders, use both border
and frameborder attributes.
Click here
to view frameset - no borders
<frameset rows="*,*" cols="*,*" border="0" frameborder="0">
Click here to view frameset
- sculpted color borders
<frameset rows="*,*" cols="*,*" border="25" frameborder="1" bordercolor="black">
Scrollbars
By default, the browser will cause both horizontal and vertical scrollbars
to appear if the contents of the frame exceeds the available screen
space. You can disable this with the scrolling attribute in each frame
tag. Possible values are no, yes, auto.
<frame name="framename" src="page.html" scrolling="no">
Margins
The browser also automatically creates an 8 pixel margin on each side
of a frame. To eliminate the margins, use the marginwidth and marginheight
attributes in each frame you want to control.
<frame name="framename" src="page.html" marginwidth="0" marginheight="0">
Resizing
When you specify a frame height or width using percentage or the *
variable, the browser automatically resizes the frames as needed if
the window is resized. By default, users can also manually resize frames
using their mouse. To prevent users from resizing, use the noresize
attribute in each frame you want to control.
<frame name="framename" src="page.html" noresize>
Customize
a Frameset
- Edit lab05c you previously made.
- Add a 25 pixel lime border and set frameborder
to 1.
- Add a 15 pixel margin on all sides for each frame.
- Prevent scrolling and resizing in the top row and
left column.
- Save the file as lab05d.html and view in the browser.