weballey logo
left Frames - aesthetics backnext right
homesearchsite mape-mail
< esthetics >
bad things
quick recap
      Plain frames are ugly. Thick fat gray borders, scroll bars where you don't want them, graphics shifting out of place. Your whole layout may be messed up, if the browser window is too small. So what shall we do about it. First we make the borders disappear. You can make them wider, give them a color, use background images. But of course you just want to get rid of them.


    This is where the trouble begins. You have to specify three different attributes, to satisfy all browsers. Everyone seems to want to reinvent the wheel on this. Don't try to understand it, just use all three attributes shown above to the FRAMESET tag, and set them all to zero. Then everything will be fine in all browsers.

Show me! <FRAME SRC="page.html" SCROLLING="NO">

Scroll bars
    Next thing is the scroll bars. Much like the normal web page, scoll bars will appear, if your page does not fit in the frame. I don't know about you, but I find them hidious in the middle of a webpage. You can turn them off, by adding the SCROLLING attribute to the FRAME tag, and setting it to NO. No scroll bar will ever appear. To see the difference, press the show me buttons on this page, and resize the window so the text doesn't fit inside anymore.
    There is a huge problem with this, when the page is larger than the frame. Then you cannot get to the part that is not shown. If that part is your menu you are in big trouble. Wouldn't you just love to hate it? Not much you can do about it. Just keep your menus short, which is no bad thing anyway. Most people get confused when offered too many options. Choosing out of five options is a lot easier than fifty.

Show me! <FRAME SRC="page.html" MARGINWIDTH="0" MARGINHEIGTH="0">

    Normally frames have a margin or offset, that varies in size depending on the browser. Sometimes you will want to show one graphics split to two frames next to eachother. Then you wouldn't want any margin splitting up the image. It might be a good idea to experiment with backgrounds, since they never have a margin. When there are no frame borders, the margins are just wasting valuable space. So again: let's get rid of them. This is accomplished with the MARGINWIDTH and MARGINHEIGHT attribute, both set to zero.

Show me! <FRAME SRC="page.html" NORESIZE>

    Frames can normally be resized. Put your mouse cursor on the border, and you can stretch the frame any way you like. When borders are not visible, you cannot do this most times. But to be sure, or when you do show borders, you can prevent this from happening. Add the NORESIZE attribute to the frame you want to keep its shape.

goto top  
leftCopyright © Gerben Hoekstra - All rights reserved backnext right