PDA

View Full Version : VERY Basic Question :)



Black_Apalachi
22-12-2007, 10:07 AM
My layout consists of:


top banner area
left hand side navigation area
central main content area
right hand side bulletin areaOk all my pages will be exactly the same except for the main content area. Is this where an iframe comes in?

If so, can anyone explain how I don't have to build every page from scratch (ie: I just put up the main content on each page rather than the banner, navigation AND bulletins)?


+rep for useful help :D.

reindeer.
22-12-2007, 10:11 AM
have a read through that :)
http://www.yourhtmlsource.com/frames/inlineframes.html
of course the first example on there is customisable so if you want to change it use the following:

frameborder="0"
setting the border to 0 gets rid of it, allowing the page to seamlessly integrate with your main page. Possible values are 1 (yes) and 0 (no), you cannot give it a bigger border.

marginwidth="x"
adds a margin to the sides of the framed page.

marginheight="x"
adds the margin to the top and bottom of the framed page. Added to any margins (http://www.yourhtmlsource.com/myfirstsite/body.html#MARGINS) you've given the pages in their <body> tags.

scrolling="no"
if the framed page is too big for the dimensions you've specified a scrollbar will appear. This attribute will stop this from happening.

align="right"
like the image attribute, this will affect how the text around the frame aligns itself.

hspace="x"
sets a margin of white space around the frame to the sides.

vspace="x"
sets a white-space margin to the top and bottom.

Black_Apalachi
22-12-2007, 10:22 AM
Cheers, +rep :).

reindeer.
22-12-2007, 10:23 AM
its okay ;)

Black_Apalachi
22-12-2007, 10:27 AM
Right, so would my main content be in the iframe or would it be the rest of the page without the main content?

Forge
22-12-2007, 11:43 AM
Your wanting 3 columns am i right?
Why dont you use css & divs?

loserWILL
22-12-2007, 01:58 PM
Use DIVs styled with CSS, or PHP includes/AJAX (PHP includes & AJAX are more like iframes - DIVs are a way to code your actual layout).

Aflux
22-12-2007, 02:04 PM
Don't use iframes, use PHP includes for everything bar the content [use a different page for each content page].

Black_Apalachi
22-12-2007, 06:30 PM
Thing is, I don't have a clue what that is - I just got the hang of iframes lol.

While I'm still using them, does anyone know why you have to have a margin? The minimum is 1px so I've got an annoying 1px thick white line going througb everything :@.

Black_Apalachi
22-12-2007, 06:55 PM
Oh nvm, it lets me set it at "0" now :rolleyes:.

Aflux
22-12-2007, 07:04 PM
It's really, really simple;


<?php

include("page.php");

?>Use that in everything expect the content area and then just use different pages for the content area like site.com/home, site.com/news etc.

Black_Apalachi
22-12-2007, 07:05 PM
It's really, really simple;


<?php

include("page.php");

?>Use that in everything expect the content area and then just use different pages for the content area like site.com/home, site.com/news etc.

Is that instead of iframes?

loserWILL
22-12-2007, 07:10 PM
Is that instead of iframes?

Yes, it is.

Aflux
22-12-2007, 07:11 PM
It eliminates the iframes, they work in different ways - both just as easily.

If you get stuck I'll help you - the benefits are huge [web standards mainly].

Black_Apalachi
22-12-2007, 07:12 PM
Lol I've spent ages fixing these up :P.

Ok I'll try that, thanks :).

Am I supposed to replace "page.php"?

Also, do I need to remove all the iframes now?

Want to hide these adverts? Register an account for free!