|
|||
|
Welcome back. This is article number 14 in the series and article number 3 in the frames section. If you are only interested in the frames section you should make sure and read the first two articles before you read this one. If you are a complete beginner and want to learn about other aspects of html as well, then you should read the other 13 articles first. For a complete list of the articles about html go to http://www.suite101.com/articles.cfm/htm...
This month I will discuss a small but important part of frames. Up to now you have been making frames of equal size. For example a document with two frames, in columns, with each column being exactly the same size. The code for a page like this would be similar to the following: <html>
But in general we don't use frames of equal size so this month I will show you how to insert frames of different sizes. You can specify the size of frames in a few different ways. The first way is that you can specify the exact size of each frame in pixels. For example: <frameset rows="245,305,50"> : This creates three frames in rows, the first one of height 245 pixels, the next of height 305 pixels, and the final one of height 50 pixels. Another example is : <frameset cols="335, 145,320" : This creates three frames in columns, the first of width 335 pixels, the next of width 145 pixels, and the final one of width 320 pixels. As you may have noticed you set the height of rows and the width of columns. The width of rows depends on the size of the browser window, as does the height of columns. The next way to specify the size of frames is as a percentage of the browser window. For example : <frameset rows="30%,70%"> : This creates two frames, in rows, the first of which is 30% the height of the browser window and the second of which is 70% the height of the browser window. Another example is <frameset cols="20%, 65%, 15%"> : This creates three frames, in columns, the first of which is 20% the width of the browser window, the second of which is 65% the width of the browser window and the third of which is 15% the width of the browser window. When using "percentage references" if your total percentages do not add up to 100% then the browser will adjust them so as they do, but the results are not completely predictable. For example if you write <frameset rows="10%,40%"> Internet Explorer 4.01 adjusts this to <frameset rows="20%,80%"> but other browsers may interpret it differently so you should make sure that your percentages add up to 100%.
The copyright of the article Frames - part 3 in HTML Lessons is owned by . Permission to republish Frames - part 3 in print or online must be granted by the author in writing.
For a complete listing of article comments, questions, and other discussions related to Oisin Prendiville's HTML Lessons topic, please visit the Discussions page. |
|||
|
|
|||
|
|
|||