Ask questions via twitter! Message any question to @answers on twitter. We'll publish the question and send you a reply each time there's a new answer.
Next Question

Answered Question

 
M$5 May 21, 2009 01:55 AM

css vs frames

On a frames based web site, I can have a top, bottom, left, and right panel surrounding a central content frame. I can place a hyperlink in any of these spaces and tell it to open another page or a graphic in any other frame by specifying a target frame.

I want to have labels on the left panel linked to photos and display the photos linked to those labels in the center frame.

The best I can do with css is to have the photo open in a new page.

Can any of you web experts help me do this in ccs?
Interesting Question?  Yes (3)   No (0)   

Interesting: cascadehush, arjo, hishaman

RSS
 
 

Best Answer  Chosen by Asker

 
May 21, 2009 11:44 AM
Loading content from one frame to another?

This is one of the most important topics regarding frames...how to have a link from one frame, that when clicked, will load content into another, among other things. By default, when you have a link in one frame, the content that's loaded will be loaded in the same frame.

check this link to learn how to do that in a very simple way with out needing tricks:
http://www.javascriptkit.com/frame2.shtml

---------
Using CSS Styles:

I suspect that CSS fails as a frame replacement. Consider a site with one navigation frame and one content frame. If I understand CSS correctly, the contents of the navigation frame must be replicated in each of the content pages. That can lead to a maintenance nightmare. The situation can be worse: consider a navigation frame that offers three alternative navigation pages, such as a table of contents, a subject index, and a search page. Must each content page have three different versions, one per navigation page? Yow! The headache of exponential potential!
http://www.rdrop.com/~half/Creations/Writings/TechNotes/CSS.html

-------------------
Learn more about Frams on here:
http://www.w3.org/TR/WCAG10-HTML-TECHS/#frames

Extra information and an example:
http://www.discussweb.com/html-css-javascript-coding-techniques/2964-how-do-i-make-link-form-one-frame-update-another-frame.html

interesting discussion I found for you about targeting a like a frame:
http://www.frihost.com/forums/vt-47880.html
Source(s):
http://www.javascriptkit.com/frame2.shtml
http://www.rdrop.com/~half/Creations/Writings/TechNotes/CSS.html
http://www.w3.org/TR/WCAG10-HTML-TECHS/#frames
http://www.discussweb.com/html-css-javascript-coding-techniques/2964-how-do...
http://www.frihost.com/forums/vt-47880.html

Asker's Rating:
• Thanks.

I learned a lot more than I expected from this question.
Yours was the only one that actually answered the question I asked.

The code in the example http://www.frihost.com/forums/vt-47880.html
with a very slight modification should do exactly what I need.


Tags: div, html, fram, css

Helpful Answer?  (1)   (0)   

Helpful: williamwaco

Tip hishaman for this answer
Permalink | Report
   Reply  
 
 
 
May 21, 2009 12:41 PM
Yes, and hence my original answer that what the questioner was looking for was a javascript implementation. CSS really has nothing to do with dynamic content.

Otoh, you could do with with dhtml.

Report
 
 

Other Answers (5)

Sort By
 
May 21, 2009 03:06 AM
I don't know about css, but you can use javascript to change the source image of an image tag. You'd have a page with an image on it, and you'd have a link or button somewhere with a bit of javascript attached to it. The script would change the source image and the image would change accordingly.

Or you could use a service like shutterbug or squarespace that has this already figured out for you, or any number of programs including Lightroom which will generate sophisticated web galleries for you without needing to worry about the code.

It seems a bit silly to re-invent the wheel when this has been done a hundred times before.

Helpful Answer?  (1)   (0)   

Helpful: williamwaco

Tip cascadehush for this answer
Permalink | Report
   Reply  
 
 
 
May 21, 2009 08:12 AM
I wouldn't use frames at all. Instead of frames I would use a CSS grid or tables. The main reason is because a link in frame 1 (the left frame) cannot change the content of 

frame 2 (the content frame)

A really good and reliable CSS grid builder is the YUI CSS Grid Builder


If you want to use tables to create your sites take a look at these sites:

The reasons I would use CSS or tables instead of frames is because:
  • A link in one frame cannot change the content of another frame. This is a build in security mechanism. All you can do is open a new window and change that content.
  • frames are ugly, 1999 called they want their frames back ;-)
So if you use frames you are making it harder to create a good site instead of easier.

Good alternatives I would recommend are:
You can find even more Open source image galleries here:
http://www.attackr.com/best-of-the-rest-opensource-image-gallery-software-part-1/
Source(s):
http://developer.yahoo.com/yui/grids/builder/
http://developer.yahoo.com/yui/grids/
http://www.w3schools.com/html/html_tables.asp
http://en.wikibooks.org/wiki/HyperText_Markup_Language/Tables
http://www.attackr.com/best-of-the-rest-opensource-image-gallery-software-p...


Tags: webdesign, webdevelopment, html, css

Helpful Answer?  (3)   (0)   

Helpful: infomaven, imadrid, williamwaco

Tip arjo for this answer
Permalink | Report
   Reply  
 
 
 
May 21, 2009 09:22 AM - Fact Refuted
You're totally wrong about frames. A link in one frame can change the contents of another frame. It's kinda the whole point to frames. It means you can have one frame with navigation links, and when you click on one, another frame can have it's contents changed. This is what the asker said he could already do.

In fact, you can implement a gallery using frames without any javascript or css. It's kinda neat really... if you're concerned about security then an javascript free implimentation using frames would be much better that a frame free implimentation that relied on a lot of code.

For whatever reason, frames never really took off, and javascript was implemented in browsers at about the same time. People could do tricks with javascript (like the one I mentioned) and so for whatever reason javascript took off and frames didn't. I always thought that frames were a great idea, but they are considered old fashioned, so nobody wants to use them anymore. Plenty of old-fashioned things are good.

Other than that, it looks like you've provided a lot of useful links there.

Report
 
 
 
May 24, 2009 03:06 AM
There is an enormous amount of really good stuff in this answer. I really like that grid builder.

Unfortunately none of it solves the original question or offers an alternative.

Report
 
 
 
May 21, 2009 07:54 PM
Ok I want to make sure I get this clear. You want to use css to open up a picture in your main frame from your left side frame. First of all I have to say CSS is used for styling your site, not putting in links. It makes your text look pretty. http://en.wikipedia.org/wiki/Cascading_Style_Sheets. To answer your question you need to change your attributes in your image or text

Please see the link for reference.
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_frame_navigation
http://www.w3.org/TR/REC-html40/present/frames.html
Source(s):
W3C and Years of exerpeince


Tags: frame, html, navigation, css

Helpful Answer?  (0)   (0)    Tip trevortye for this answer
Permalink | Report
   Reply  
 
 
 
May 23, 2009 05:31 PM
PICK CSS

Helpful Answer?  (0)   (1)   

Unhelpful: williamwaco

Tip galaxybrowser for this answer
Permalink | Report
   Reply  
 
 
 
June 12, 2009 05:27 AM
CSS is more standard way to controlling look, feel, and placement.

Have you tried programming in ASP.NET
Source(s):
asp.net


Helpful Answer?  (0)   (0)    Tip davepamn for this answer
Permalink | Report
   Reply  
 
 

Answer this Question

How tips and payments work

This question has already been resolved. You may add an answer to it but you will not be eligible to win best answer or any associated tips.

Ask a Question


140 characters left
Top of Page
Buy Mahalo Dollars with Credit Card or PayPal

Top Members

This Week All Time
  • buddawiggi
    buddawiggi
    2nd Degree Black Belt
    27184 Points
    M$783.09 Earned
  • opher
    opher
    Purple Belt
    4186 Points
    M$192.17 Earned
  • annelisle
    annelisle
    Purple Belt
    2726 Points
    M$82.97 Earned
   See All
 

Most Popular Tags

mahalo(1602)
iphone(462)
music(459)
google(355)
food(320)
online(294)
beer(279)
money(262)
movies(255)
apple(251)
aotd(235)
health(217)
video(206)
dog(205)
free(203)
   See All
 

Categories

Welcome New Members


 
 
Mahalo Dollars are the currency of Mahalo Answers.

Each Mahalo Dollar costs $1.

Once you earn more than 40 Mahalo Dollars, you can request to be paid via PayPal. Each Mahalo Dollar is currently worth $0.75 when paid out via PayPal. Learn More

 
 

Please log in to use this function.