Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

resizing frame sets?

I've done different mini web projects, and I usually use framesets to organize links, titles, and so on...but the problem comes to different monitors or browsers. The text in the framesets will sometimes be cut off or there may be extra space in parts of the frameset. So my question:

Is it possible to "auto adjust/size" the frameset to the computer and browser? Meaning, so it can look exactly the same on one computer as it does on another.

Here is an example of the code I use usually for my framesets:

Code:
<HTML>

<HEAD>

<TITLE>Test</TITLE>

</HEAD>

<FRAMESET rows=10%,85%,5%>

<FRAME SRC="header.html" noresize scrolling=no frameborder=no>

<FRAMESET cols=10%,85%,10%>

<FRAME SRC="left_bar.html" frameborder=no noresize scrolling=no>

<FRAME SRC="Main.html" frameborder=no noresize name=main>

<FRAME SRC="right_bar.html" frameborder=no noresize scrolling=no>

</FRAMESET>

<FRAME SRC="footer.html" frameborder=no noresize scrolling=no>

</FRAMESET>

</HTML>
 
Short answer: no.

The thing is that you never know the screen resolution or window size of the user. The only real way to do this is to scale the font sizes and image sizes whenever the user loads a page or resizes the window. Those are browser dependent, so you would have to code that for each browser. Not only that, but playing with (read: decreasing) font sizes is rarely a good idea because you never know how good the eyesight is of the person who is reading it.

If you are concerned with things getting cut off, you may wish to consider using absolute sizes. For example, you can set your left frame to be 100px (or however large or small your left frame should be) instead of 10%, and set the remaining space to *, and your right frame will then take up the remaining space in the window.
 

Kelevra

Sponsor

Ceroscuro is correct shadow, however it can be done with iFrame, but it only works in Google Chrome.

Code:
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

    <title>Impur-Anime || Version 0.1 </title>

    <style media="all" type="text/css">

    #iframe { height:100%; width:100%;

        

    }

    </style>

</head>

<body>

<iframe id="iframe" src="http://google.com"></iframe>

</body>

 

</html>

 

Preview: Google Chrome

googlechromeiframe.png


Preview: All Others

As you can see it worked only width wise not height wise.

othersiframe.png
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top