Topic: This is Crazy I know (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=28622" title="Pages that link to Topic: This is Crazy I know (Page 1 of 1)" rel="nofollow" >Topic: This is Crazy I know <span class="small">(Page 1 of 1)</span>\

 
skyetyger
Bipolar (III) Inmate

From: midair
Insane since: Jul 2001

posted posted 11-09-2006 01:39

OK..I am crazy but I want to do this if it is possible
This is what I am trying to get to work..
IS there any way to get any of this code to work for an IFrame or are IFrames always absolute width/position with scroll bars? Can I treat an IFrame as a "box div"?? Anyone know any better code?
#iframe
{
position: relative;
overflow: hidden;
float: left;
margin: 3% 0% 0% 4%;
width: 15%;
clear: left;
border: 10px;
border-color: blue;
}
body..

<div id="iframe"></div>

(Edited by skyetyger on 11-09-2006 01:42)

skyetyger
Bipolar (III) Inmate

From: midair
Insane since: Jul 2001

posted posted 11-09-2006 02:08

Ok..this works..It resizes but it is basically a "div" and an inline element..Do certain elements have to be defined "inline" such as scrolling..height width or can it all be done in the div? Is an Iframe an "object" whose properties have to be set "inline" within a div? I am not certain about the "position" yet..whether it will float relative but it does resize..Any Ideas?

#iframe {
position: relative;
float: left;
margin: 25% 0% 0% 4%;
overflow: hidden;
border: 1px;

}


</style>
</head>
<body>
<div id="iframe"><IFRAME src="http://www.google.com/" scrolling="no" width="30%" height="45%">
</iframe></div>

(Edited by skyetyger on 11-09-2006 02:31)

DL-44
Lunatic (VI) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 11-09-2006 03:08

I think you are going to have to take a giant step back and explain what exactly it is you are trying to do, and what about it is giving you trouble.

I can make very little sense of your actual question(s) here, and what 'resizing' has to do with anything....?

skyetyger
Bipolar (III) Inmate

From: midair
Insane since: Jul 2001

posted posted 11-09-2006 04:46

OK..
I have a page that has navigation links on it..and I want to load that page into an Iframe and that IFrame is OR is in a side div that is floating relative...I want the Iframe to float..relative to the other content and resize with the browser..Can an Iframe be a DIV or is it always an inline element? That I think is the question..
SO..The nav will be in a side frame.. a separate "frame content" page. The links on the Iframe content page will reload the contents of the web sites html pages into a target "div" box in the center..This can be done with absolute positioning Because Iframes are absolute..but I don't know about relative/float. It seems that the in line element does not take on the CSS properties of a div or does it? Is it an absolute object in some sense like an img..that cannot be %?
The rest of the page will be standard CSS...just two Iframes..but Header, footer, right side nav will be CSS and not be Iframes
That way I don't have to redo the navigation menu on every page when I want to add a link..I just add the "nav" page into the side nav frame..then I "target" the main Iframe from those navigation links.
Does that make sense? It is working..sort of.."a bit creative?" Yes!..but
I don't want to use script for the menu..and if I don't..I have to download and update every page individually..
Any Ideas?
Btw...if you want to get rid of the border..you have to put "frameborder="0" in the inline element..or it will have a border no matter what you do..

(Edited by skyetyger on 11-09-2006 05:10)

DL-44
Lunatic (VI) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 11-09-2006 05:34

Ok...
I think we have some terminology issues, or perhaps jsut some CSS misunderstandings. However -

1) any element can be set to display either INLINE or BLOCK

2) putting the iframe in a div is irrelavent. You can simply apply the CSS properties you want to the iframe (as with any element).

3) why do you not want to use a script for this? there are so many dependable and efficient methods for doing this using SSI, PHP, Javascript and any number of other languages...

4)

quote:

skyetyger said:

Does that make sense? It is working..sort of.."a bit creative?" Yes!..but


I wouldn't call it 'creative' (no offense), it's just an obsolete method for setting up your navigation.

As to the actual defined question:

quote:

skyetyger said:

Can an Iframe be a DIV or is it always an inline element? That I think is the question..


Well....no. An iframe is an iframe. Only a div is a div.
But no, it does not have to be an inline element.

As for how its width can be set, all I can say is: set the width the way you want. Does it work? If so, you know it will work If not, well....

A

quote:

skyetyger said:

Btw...if you want to get rid of the border..you have to put "frameborder="0" in the inline element..or it will have a border no matter what you do..


What Doctype are you using? "frameborder" is a long deprecated attribute if I recall correctly. Set the border in your CSS.

Though again let me say - frames are really not the way to go with this. Frames lost their prominence for a reason - they suck

skyetyger
Bipolar (III) Inmate

From: midair
Insane since: Jul 2001

posted posted 11-09-2006 05:57

I can't write "script." I have to use other peoples scripts and rewrite my ideas into their "box." I looked at scripts and none of them match the my page..and I despise "copyright" hassles...I think with Iframes I might be able to make the page look the way I want it to..exactly..although it may be quicker to learn DHTML, Perl, Java and PHP..all of them.. than to get this to work..So I hear you there!
Frames suck..Yes Indeed
However..with the target property into other frames...there are some interesting possibilities
Such As..
There is one page with the CSS content that never changes..header, footer etc
Then there is a nav Iframe..that loads content into one other frame..
So the page 1 suddenly becomes page 2 without any page changing ...Only one frame changes when the "nav link" is clicked for page 2..It changes page content which is the only change from page to page..
It may work..
If not ..I will have learned CSS frames..which suck
IE has to have the "frameborder="0" in the body inline element tag of the Iframe ..as far as I can discover..It is a browser bug..I think
Iframes are not entirely..CSS..there are properties that have to be set in the body ..as far as I can discover
What I mean by "resize" is how the page degrades when the browser is resized..An image for instance will not "resize or bump down to degrade gracefully when a browser is resized..An image is a "body" object that is not "fluid" in some sense..
IFrames seem to be somewhere between a div, which is pure CSS and an Image..which are strictly "objects" in the "body"

(Edited by skyetyger on 11-09-2006 06:10)

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 11-09-2006 08:48

The bandwidth gain doesn't really stand. At most your navigation, header, footer, doctype, link tags, ... will take a grand 4kb of markup and the images will be cached on the first page.

Now if you're really concerned about the bandwidth, enable GZIP and voilà. Problem solved.


An IFrame is just like another window. There's no magic in there. You can style & lay it out it in it's parent document, but what's inside it is styled .... inside it. The document loaded in it has its own CSS.


Everything* "resizes" if you size using %
*: but background images. CSS3 will change that.


One last note. IE is crippled with bugs. The way to go is to design your site in a real browser ( read: Safari, Opera, FireFox or Konqueror ) then do some voodoo to get it working ok-ish in IE.

[edit] Could you post a picture of the mockup of your site and a link to what you've got so far ? [/edit]

(Edited by poi on 11-09-2006 08:52)

kimson
Paranoid (IV) Inmate

From: Royal Horsing Ground
Insane since: Jan 2005

posted posted 11-09-2006 13:23
quote:

poi said:

then do some voodoo


Haha The way I feel ever so often...

It seems like you are at the point where I was with CSS a few months ago, skytyger. I would give you another advice: try and look at your problem from another angle. I have spent so many hours trying to do something with CSS while the answer was actually very obvious and much simpler.
You can achieve A LOT with only HTML and CSS, and it took me time to realise it. It seems like pointless advice but I grew to learn it the hard way: by making mistakes, starting everything over and over, etc.
... and I have still a lot to learn.

If you upload your work as poi requested, we could probably point out to you a way of getting rid of the IFrame altogether.

DL-44
Lunatic (VI) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 11-09-2006 14:28

Some tutorials at the Gurus Network all desinged for exactly what you want to do:

SSI - http://www.gurusnetwork.com/tutorial/server_side_includes/

PHP - http://www.gurusnetwork.com/tutorial/php_templates/
http://www.gurusnetwork.com/tutorial/php_templates_2/

Javascript - http://www.gurusnetwork.com/tutorial/javascript_menu/
http://www.gurusnetwork.com/tutorial/advanced_javascript_menu/


quote:

skyetyger said:

Frames suck..Yes IndeedHowever..with the target property into other frames...there are some interesting possibilitiesSuch As..

I thinkIframes are not entirely..CSS..there are properties that have to be set in the body ..as far as I can discover


Any "interesting possibilities" especially the ones you mention, have been thoroughly used and abused for years, and have been found very lacking in many areas. As I siad before, that's why you don't see them used very often anymore - they simpyl suck. =)

And of course are not "entireley CSS..." they are not CSS at all, they are HTML
As for the particular workings, my last question still needs an answer: what DOCTYPE are you using? The DOCTYPE and how well you adhere to it will make a huge difference in how your HTML/CSS displays.

The frameborder attribute, unless you are using an obsolete doctype, will be invalid HTML. Any element that forces you to use invalid code to display properly is not worth using, without even going into its other shortcomings.

FWIW

skyetyger
Bipolar (III) Inmate

From: midair
Insane since: Jul 2001

posted posted 11-09-2006 16:39

Thanks..The IFrame does respond to a combination of linked style sheet, container div, inline commands and the CSS page called into the Frame..so % relative positing works if the configuration of all the commands is correct...What which one of the four command groups is doing..that is the hard part..
I have SCRAP so far because I never used frames in the bad old day or I would post it..
What I posted is about what I have..
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
But I "inserted" that snippet into another page...and was able to test that through my computer..The page looks terrible with that "stuck in" but It validates..for whatever that is worth
One thing I am noticing on the Web lately is that many web site pages..in spite of being psuedo CSS.."linked relative" and broadbanded..are getting slower and slower to load..MSN on Internet Explorer is about a 2 minute wait..Talk about cutting edge!
I have stayed with clean..very clean CSS..no scripts..no fancy flashing..and very few live feeds and updating and the pages I write are very fast ..but I have to solve the UpDate Problem on the navigation so I can add links to all pages by changing one page..Changing main content isn't a problem because it is mostly c/p "img src" code..point and click..
One thing I noticed..IFrames are a bit slower to load than images..That doesn't please me..A simple script may be better solution..So I will go to the Guru's Network and see what I can figure out..but I am still working on the frames..Also Scripts are being filtered out by the virus checkers..Many Active X and java scripts..unless I manually set the security ..are axed..in many cases

skyetyger
Bipolar (III) Inmate

From: midair
Insane since: Jul 2001

posted posted 11-09-2006 17:00

OK D-L 44
I went to this link
PHP - http://www.gurusnetwork.com/tutorial/php_templates/
http://www.gurusnetwork.com/tutorial/php_templates_2/

And it does exactly what I want to do..
And I understand it..more or less
So the hours of trying to configure and learn fIrames..I will invest in making that work..and if I don't like PHP or it gets too involved I will go back to making the frames work
You convinced Me..

DL-44
Lunatic (VI) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 11-09-2006 17:52
quote:

skyetyger said:

You convinced Me..



One of the best things to hear
With minimal effort you can use those methods to improve your web sites dramatically. And it is something that will help you move *forward* instead of backward.

If you get hung up, please - don't go back to frames; find a method taht works and works well.

skyetyger
Bipolar (III) Inmate

From: midair
Insane since: Jul 2001

posted posted 11-09-2006 18:30

Thanks DL-44
I have avoided anything more complicated than CSS for years..I just don' t have time to learn..I have a small personal site that is always a mess because it is where I play with things that interest me..and upload them for general discussion amongst friends and family..
Recently some friends/business associates started asking if I could design sites for them..because..they say..my site is simple and fast..*thanks to CSS ...and help from the friends on the Asylum..and Guru's network* but I have to get up to speed on the server side..Get a bit more professional..
Time to move along..to php at least

(Edited by skyetyger on 11-09-2006 18:39)

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 11-09-2006 21:07

Oh boy... Whenever I see those PHP links dredged up I shudder.

They are not wrong, but they are a bit outdated. For example $DOCUMENT_ROOT . '/template/header.php' should most likely be $_SERVER['DOCUMENT_ROOT'] . '/template/header.php'

I should most likely update those, I always think about it but never get around to it.

If you run into any problems do not hesitate to drop me a note.

codetown @ gmail.com

skyetyger
Bipolar (III) Inmate

From: midair
Insane since: Jul 2001

posted posted 11-09-2006 22:27

Thanks War Mage
I already ran into a problem..like a big door that won't open..I have to find the "first thing" first..I don't know enough to ask an intelligent question..

You know what..the next time someone asks me about making web pages for them..I am going to refer them to some of the people here who are already up to speed..Then I can go back to doing my simple graphics and simpler pages...

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 11-10-2006 14:35

Don't give up so quick. It is good to be well rounded. It does not take way too much exploring to learn the basics about a server side language and a database and it will allow you to do a whole lot more with your sites.

In the end you will become more marketable, and the more you know about the way the web works the better you will be able to suit your designs to the web.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:

« BackwardsOnwards »

Show Forum Drop Down Menu