View Full Version : Help with Frames please
5th May 10, 05:00 PM
New to this forum - new to XHTML & CSS but have a background in programming many many years ago!
I'm putting together a website and I have roughed out a layout using a table. Now I want to use frames as they allow a more efficient screen refresh etc.
The problem I'm having is controling the width of the frameset. What I want to achieve is the same as you see on this website - a central area with text and/or graphics in which the frameset and frames reside bordered on each side by a blank area.
Can anyone tell me what I do to restrict the frameset to the central part of the screen please. Once I have done that, I'm ok with setting out the frames wihin the frameset.
5th May 10, 06:08 PM
What languages do you use?
Well, first, there is no need to use frames, and table based layouts are depreciated.
Nonetheless, you set the width with CSS, and then you give it margin:auto which centers it.
7th May 10, 03:35 AM
Yes there is no need for frames. In fact you should make a serious effort to avoid using or speaking of frames.
7th May 10, 09:40 AM
Thanks for the prompt replies. I'm using XHTML and keeping all of the formatting in a linked CSS file.
I'm not sure what you mean by tables being depreciated. As I mentioned I'm new to web design but from what I've picked up so far I understand that using tables to organise the layout is possible but not encouraged by W3C.
I've chosen frames as I want some content to remain static whilst other content is changed/refreshed according to user action. I thought that using frames was more efficient as it reduces the requirement to refresh the whole page constantly. If there is another, more efficient way, then I'm all ears for suggestions. Could you please explain the reason for saying that I should avoid using frames please? Is this because of practical reasons or because they are perceived as being difficult to manage and maintain.
Again, all suggestions gratefully received if there is a more efficient, controllable way of organising content on a page where some remains stataic whilst other content changes.
My aim is to achieve web pages that display very quickly and that are simple to navigate by the user.
7th May 10, 12:40 PM
Tabled layouts are indeed deprecated. There is nowhere near the flexibility needed for great design in a tabled layout. The only time i use tables is for data or html newsletters. I wouldn't use frames either, as they load slow, don't display properly in all browsers and lessen the user experience. Look at using ajax techniques to bring in same site content, or includes.
7th May 10, 06:05 PM
Could you please explain the reason for saying that I should avoid using frames please?
Based on my experience with frame based sites, they are a nightmare to maintain and update,they make pages slow, and require a lot more DOM scripting.
I've also heard that frame based sites are not accessible/usable to screen readers and not good for SEO.
AJAX is the best way to dynamically load content into a page.
13th May 10, 08:05 PM
you could add a small bit of PHP includes to the mix, basically they work very similar to frames inn the sense you want to use them.
you code the static part of the page like normal HTML/XHTML except in a .php file using divs and CSS for layout, where you need changeable content you use the <?php include=""> command (with a php switch to change it) to "include" or drag in the content from other files.
Google is your friend for learning little bits of PHP for this :)
25th October 10, 10:42 AM
frames are horrible and will not work in html5 coded sites.
not only that if you have your header/nav in a top frame and content below, a link through a search engine to the content page will render only that frame and the site will be totally unusable.
and if i was just new to web design I would be looking to the future of coding pages, rather than to the late 1990's when frames were all the rage.
a layout based on tables is also fraught with danger, and is only recommended for email campaigns, or as tablulated data (which is what their intention should be anyway)
and again with HTML5 sites ANY styles on tables will not render, so you would need to use id/classes for the fields, in which case id say why not use DIVs or
go to w3.org. download the latest specification and read it from head to toe. (and dont listen to the noobs that say, "browsers dont support HTML5", it was designed to be backwards compatible and a simple script at the start renders it fine back to ie6.)
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.