View Full Version : Main Window - Div?


Incendio
05-16-2005, 04:58 PM
Hi people! I wonder about the main frame, where all the info pop ups.

If ou go to this site = http://www.brilliance-online.org/layout.html (the main frame is an IFRAME, right? And the whole page has two srollers, one for the "whole" page, and one for the "iframe".

And this site = http://www.lohanonline.com/lindsay.php isn't using IFRAMES, I thnk. She use something else, whatever it can be ... *?*

I think it's divs something. I've seen it around, but I really never figured out what it is. The thing with Iframes is that you have a specific size period, but the other way, divs (?) always change their size depending on the content.

Now I have some questions. What's better? Should I go with an Iframe and have two scrollers, OR should I go with divs (?).

Also, what is the best, what works best?

And also, a very important matter, what's easiest to me to code? Because Iframes is quite easy, but I know absolutely nothing about divs.

Thank you :)

pb&j
05-16-2005, 05:29 PM
divs and iframes are two seperate things, so hard to compare.

div is like a P tag area. it just holds whatever you put into it.

iframe is a window showing different webpages inside of it and can change contents at the click of a link.

if you prefer iframes, perhaps stick with that for now.

Incendio
05-16-2005, 06:19 PM
I really dont know whát I prefer because I've never worked with divs before.

I understand a little bit about the divs thingys now. But I still wonder, every file you want to be displayed in your "main frame/window", whether it's in an iframe or divs ... I wonder, do you have to put some coding in these files, each one of them, telling you want them do be 'divs'. It's so hard to explain. I mean, when I'm making a document that's to be displayed in my iframe, it looks like this:




<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="style2.css">
<title>M A G I C </title>
</HEAD>

CONTENT HERE


Already in the link, I specify that I want this document to open in the iframe.


<a href="http://www.URL.com/blabla.html" target="main"> » Info</a><br>
Read more about info etc etc.<br></br>

So it's really easy to work with iframes, because, that's really the only thing you have to do, to specify that you want it to open in the iframe.

It you check my first code, there is nothing in there that points and tells the file that it should be opened in an iframe, so no altering there necessary.

Now I wonder, if working with divs, do I have to specify something in each and every document, ei, the first code I posted (the text in blue) or is it enough to do something like the text in Magenta, to just specify easily?

I hpe this made sense, I really didn't know how I was supposed to ask this.

EDITED: This is another example of a div? click (http://fan-sites.org/orlando/updates.php)

pb&j
05-16-2005, 07:40 PM
you are on the right track of thinking so far.

if you are going to go with a DIV, then you will need to create a whole new page that looks the same as the first for each and every link, but with different stuff appearing in the DIV area. the contents inside of a DIV cannot be changed by a click of a link. only an IFRAME can do that.