Relationship between framespacing, border, and frameborder attributes in the framework set

Source: Internet
Author: User
Document directory
  • 1. When the framespacing and border attributes are set to a value greater than 0
  • 2. When the framespacing and border attributes are set to 0
I. framespacing and border attributes

We know that the border attribute is used to set the Border width. Reference example: html4.01 Tutorial: window frame setting window Border Width example.

Similarly, the framespacing attribute is used to set the Border width. Refer to setting the frame set Border width using the framespacing attribute.

No matter which attribute is used separately, the display effect is the same.

In Dreamweaver, once the Border width is set in the "attributes" column, these two attributes are used for representation at the same time. The Code is as follows:

<HTML> framespacing="50" border="50"> <Frame src = "APPEND/frame_ B .html"/> <frame src = "APPEND/frame_c.html"/> </frameset> <noframes> <body> your browser unable to process framework! </Body> </noframes> 

View code results: link examples of framespacing, border, and frameborder attributes in the framework set

Using these two attributes at the same time is the same as using either of them separately.

Note the following:

  • If the value of the framespacing attribute remains unchanged and the borer attribute value is changed, the display effect remains unchanged.
  • If the value of the border attribute remains unchanged and the value of the framespacing attribute changes, the displayed effect is subject to the size of framespacing.

Therefore, when you need to modify the Border width in the frame set, the framespacing attribute should be the primary one.

2. frameborder and framespacing and border attributes

Next we will discuss the relationship between the frameborder attribute and the framespacing and border attributes.

For more information about the frameborder attribute, see hide window borders. When frameborder = "1", it indicates the frame border is displayed, because it is the default value, so you do not need to set it. When frameborder = "0", there are two situations:

The following uses setting the framespacing and border attributes at the same time as an example. Of course, the same effect is true if you use any attribute separately.

1. When the framespacing and border attributes are set to a value greater than 0

The following situations may occur:

<frameset cols="40%,*"><frame src="append/Frame_a.html" /><frameset rows="40%,*" framespacing="80" border="80" frameborder="0"><frame src="append/Frame_b.html" /><frame src="append/Frame_c.html" /></frameset></frameset>

View code results: Example of the relationship between framespacing, border, and frameborder attributes in the framework set (2)

At this time, although the frame border is not displayed, the space occupied by the border still exists. It also affects the webpage layout.

2. When the framespacing and border attributes are set to 0

The following situations may occur:

<frameset cols="40%,*"><frame src="append/Frame_a.html" /><frameset rows="40%,*" framespacing="0" border="0" frameborder="0"><frame src="append/Frame_b.html" /><frame src="append/Frame_c.html" /></frameset></frameset>

View code results: Example of the relationship between framespacing, border, and frameborder attributes in the framework set (3)

We found that the border between frame_ B .htmland frame_c.html disappears and looks like a webpage.

Please identify the two situations and then select them based on the actual situation in the webpage creation process!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.