[ale] OT: target= with css?

joh6nn joh6nn at hotpop.com
Tue Apr 26 16:10:47 EDT 2005


unfortunately, that's not possible.  i see 4 ways to do this, with pros 
and cons for each one.  I've listed them in the order in which i suggest 
them.

	first, you could use an Iframe instead of a Div; Iframes, if you're not 
familiar with them, act like Frames just stuck into a page (like an 
Image), without the need for Framesets.
	pros: really simple to implement, fairly cross-browser.
	cons: dissociates the content from the main page (ie, the stuff on 
fprof.html is very loosely associated with the page it gets loaded from).

	Option 2 is to keep all of the optional content on that main page, in 
separate Divs, and use a combination of javascript and CSS to show only 
one of the divs at the same time.
	pros: no content dissociation; everything is there on the main page. 
the javascript here is fairly low level
	cons: everything's on one page, so the file size starts to really jump. 
  also, a bunch more divs there on the page could really start to get 
confusing when you go to edit the content

	For method 3 you could use some mid-level javascript to pull content 
from other places and stuff it into your Div tag.
	pros: if done right, it'll look both cleaner and more visually 
appealing than an iframe.
	cons: it'll be way harder to implement than the first 2 methods, there 
will almost definitely be browser compatability issues for the 
javascript, and there's still content dissociation.

	the fourth and final thing that i can think of is that you could use 
some kind of server side solution, like PHP or SSI to build your page 
dynamicly, and insert the content on the fly, as you need it.
	pros: absolutely guarenteed to work in every browser, but otherwise 
without advantage
	cons: unless you get really clever/complicated, you're still gonna have 
content dissociation, this method requires you to reload the page every 
time you want to change the content of your Div, and will also lead to 
URL ugliness, unless you decide to add a layer of complication to keep 
the URLs pretty, but uglify your .conf/.htaccess files instead.

i can't think of any other ways to do this, though that doesn't mean 
there aren't any.



More information about the Ale mailing list