Forum Moderators: not2easy
A (header)
B (content)
C (footer)
For <B> I'll be swapping in a DIV from about 10 different DIVs (using the <position> style) depending on what navigation choice the user clicks in the header.
My problem is that the DIVs are of different vertical sizes -- and often unknown vertical sizes because I don't know how big my visitors' browser windows are. So I don't know how to position <C> so that it always appears under the <B>.
Originally I swapped the DIVs into <B> with <innerHTML> instead of <position>, and that made <C> move to where it was supposed to be beautifully. But I can't do that because in Mac browsers JavaScript image-swapping no longer works on images in a DIV once it's swapped in somewhere with <innerHTML>.
Did that make sense? How do I get <C> to appear under an absolutely-positioned DIV of an undetermined height?
Thankie-doodle, -MBJ-
(Mods : sorry it's so long, but...)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>content-switch</title>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis" />
<style type="text/css">
<!--
body, html {background:white; margin:0; padding:0;}
div {color:red; font-size:large; padding:10px;}
div.headfoot {height:100px; padding:0; margin:0; background: yellow; color:red; text-align:center;}
h1 {margin-top: 0;}
a {cursor:pointer; padding:0 30px;}
#wine {background: orange; color:black;}
#beer {background: pink; color:black;}
#whisky {background: red; color: white;}
#switches {text-align:center;}
.visible {display:block;}
.hidden {display:none;}
-->
</style>
<script type="text/javascript"><!--
function switchd(div)
{
var option=['wine','beer','whisky'];
for(var i=0; i<option.length; i++)
{obj=document.getElementById(option[i]);
obj.className=(option[i]==div)? "visible" : "hidden"; }
}
//-->
</script></head>
<body>
<div class="headfoot"><h1>THIS IS A BIG HEADER</h1>
<div id="switches"><a onclick="switchd('wine');">story one</a>
<a onclick="switchd('beer');">story two</a><a onclick="switchd('whisky');">story three</a></div>
</div>
<div id="wine" class="visible">
<p><br />
Study finds benefits in GM crops<br />
By Richard Black<br />
BBC environment correspondent </p>
<p><br />
A major study of genetically modified crops in the UK has found no evidence
that they harm the environment. </p>
<p>The Bright project looked at varieties of sugar beet and winter oil-seed
rape which had been engineered to make them tolerant of specific herbicides.</p>
<p>The novel crops were compared with non-GM cereals grown in rotation.</p>
<p>The project concluded that the GM varieties, used in this way, did not deplete
the soil of weed seeds needed by many birds and other wildlife.</p>
<p>The findings of the Botanical and Rotational Implications of Genetically
Modified Herbicide Tolerance (Bright) Link project were released on Monday</p>
<p>QUICK GUIDE</p>
<p>GM Food<br />
Bright was designed to mimic normal agricultural practice, and measure how
these GM crops would perform when used in a typical crop rotation pattern
over four years.</p>
<p>Not only did the project find no evidence of seed depletion, it also pointed
to potential benefits for farmers of growing the GM crops.</p>
<p> <br />
There do appear to be a number of reasons why farmers might be quite interested
in growing these crops<br />
Dr Jeremy Sweet, Bright scientific co-ordinator<br />
"What we have shown is that in the case of these two crops, there are
ways of managing them which are quite practical, and farmers can deal with
them quite readily," the study's scientific co-ordinator Dr Jeremy Sweet
told BBC News.</p>
<p>"There appear to be some management advantages in the flexibility of
the herbicide usage; there could well be cost-benefit advantages, depending
on the price of the herbicides and seeds when the crops are commercialised.</p>
<p>"So there do appear to be a number of reasons why farmers might be quite
interested in growing these crops."</p>
<p>However, there is little prospect of GM crops being introduced into the UK
in the short-term.</p>
<p>Distant option</p>
<p> <br />
THE BRIGHT LINK PROJECT<br />
Four-year study on relatively large plots (0.25-0.5 hectares)<br />
Studied GM winter rape and beet grown in rotation patterns<br />
Outcomes compared with plots of conventional plants<br />
GM crops tolerant to glyphosate or glufosinate herbicides<br />
One rape had cross-bred resistance to imidazolinone<br />
Studied numbers and diversity of weed seeds left in soil<br />
Looked for emergence of multi-herbicide-resistant plants<br />
Earlier this year another major trial, the Farm-Scale Evaluations or FSEs,
found that two GM varieties, a sugar beet and a spring rape, were more damaging
to biodiversity than conventional crops.</p>
<p>There were fewer insect groups, such as bees and butterflies, recorded among
the novel plants.</p>
<p>A GM maize, on the other hand, appeared to do better than its conventional
cousin.</p>
<p>Following the FSE results, Environment Secretary Margaret Beckett announced
that companies wishing to bring GM crops into the UK would have to go through
a long approval process.</p>
<p> <br />
THE BRIGHT FINDINGS<br />
GM crops showed increase weed seeds over 4 years<br />
Weed seed diversity in soil similar in GM and non-GM<br />
Advantages seen in GM in reduced weed control costs<br />
GM crops offered greater flexibility in spray timing<br />
Emerging multi-herbicide-resistant crops controllable<br />
Subsequently, Bayer CropScience, the only company with outstanding applications
for government permission, withdrew those applications.</p>
<p>Nevertheless, Bright will help biotech companies and proponents of GM agriculture
argue that the crops should not be banned on environmental grounds.</p>
<p>The European Union has indicated that member countries will in the future
have to base decisions on whether or not to permit GM agriculture on science
rather than public opinion.</p>
<p>Public opposition</p>
<p>However, Emily Diamand, senior farming researcher with the anti-GM Friends
of the Earth, was sceptical that Bright really had mimicked normal farming
practice.</p>
<p>She told BBC News: "It was done at agricultural research centres, and
real farmers never do things in the same way as they are done on research
stations.</p>
<p> <br />
FARM-SCALE EVALUATIONS<br />
FSEs report brochure</p>
<p>GM tests show wildlife danger<br />
Q&A: GM farm-scale trials<br />
"Its findings are only as useful as the questions it asks - there are
so many other things to be considered with GM crops, such as the effect on
the soil, gene transfer to other plants, and the social and health impact."</p>
<p>A UK government spokesman said of the Bright findings: "It's valuable
research, and complements the Farm-Scale Evaluations.</p>
<p>"It provides some valuable results and we'll ask Acre (the government's
advisory panel on GM crops, the Advisory Committee on Releases to the Environment)
to evaluate it, and we'll take it from there."</p>
<p>More than half of Britons who took part in the "GM Nation" survey
last year said GM crops should never be introduced in the UK under any circumstances.
</p>
<p> </p>
</div>
<div id="beer" class="hidden"> <br />
DNA bank to catch badger killers<br />
Badger<br />
Badger baiting can lead to imprisonment and a £5,000 fine<br />
A database of badger DNA is being created to snare criminals who set dogs on
the animals and dig-up setts.
<p>The RSPCA project, which will cover England and Wales, is the first of its
kind for a wild species.</p>
<p>It is hoped the database will help bring successful prosecutions against
people who dig and bait the animals.</p>
<p>DNA can already be taken from a crime scene but there has been no reference
database to prove the evidence - such as hair - is actually from a badger.</p>
<p>Experts hope to take around 400 samples from across the country to represent
the badger population.</p>
<p>Insufficient evidence</p>
<p>The RSPCA has commissioned Wildlife DNA Services Ltd to set up the database
of hundreds of badger samples.</p>
<p>Barry Fryer, chief superintendent at the Special Operations Unit at the RSPCA,
said: "The database should significantly improve our chances of successfully
prosecuting diggers and baiters.</p>
<p>"In the past, we have been unable to proceed with cases through insufficient
evidence linking the defendants to particular badgers.</p>
<p>"With the extra supplementary evidence the DNA profiling will provide,
we are confident that the cases we put forward will withstand the scrutiny
of a court of law."</p>
<p>Techniques developed</p>
<p>DNA samples of badger hair, blood or faeces can be taken from a crime scene.</p>
<p>Dr Rob Ogden, of Wildlife DNA Services, said: "At present the human
DNA profiling system used to help criminal forensic investigations makes use
of large databases.</p>
<p>"Our aim is to build up an equivalent database for badger DNA which
will assist the RSPCA in proving matches and securing prosecutions."</p>
<p>Genetic techniques for identifying individual badgers have already been developed.</p>
<p>'National map'</p>
<p>These profiles have been successfully used to identify individual badgers
within three social groups with a 99% success rate.</p>
<p>When enough samples are collected, scientists will begin profiling and recording
them to form a national map of profiles from badger social groupings.</p>
<p>RSPCA Special Operations inspectors have been given DNA testing kits which
they will use to collect samples for the database.</p>
<p>In 2003, the RSPCA received 241 complaints of badger digging in the UK.</p>
<p>Under the Protection of Badgers Act 1992, it is illegal to interfere with
a badger sett.</p>
<p>The maximum sentence is six months' imprisonment and a £5,000 fine.</p>
<p></p>
</div>
<div id="whisky" class="hidden"> Country profile: Japan<br />
Map of Japan<br />
The economic miracle achieved by Japan in the second half of the twentieth century
was the envy of the rest of the world.
<p>But the rapid expansion of the post-war years - propelled by highly successful
car and consumer electronics industries - had by the 1990s run out of steam.</p>
<p>The 1997 Asian financial crisis, and bouts of recession, precipitated major
banking, public spending and private sector reforms.</p>
<p>OVERVIEW</p>
<p><br />
OVERVIEW ¦ FACTS ¦ LEADERS ¦ MEDIA</p>
<p>Japan has the world's second-biggest economy, but it remains a traditional
society with strong social and employment hierarchies - Japanese men have
always tended to work for the same employer for the whole of their life.</p>
<p>But this and other traditions are under pressure as a young generation more
in tune with western culture and ideas grows up.</p>
<p>Japan's relations with its neighbours are still heavily influenced by the
legacy of Japanese actions before and during World War II. Japan has found
it difficult to accept and atone for its treatment of the citizens of countries
it occupied.</p>
<p>A Japanese court caused outrage by overturning a compensation order for Korean
women forced to work as sex slaves. South Korea and China have also protested
that Japanese school history books gloss over atrocities committed by the
Japanese military.</p>
<p>Japan's role on the world stage is considerable. It is a major international
aid donor and a main source of global capital and credit. But the deployment
of Japanese troops in Iraq following the US-led invasion in 2003 divided public
opinion. Critics said the move violated the country's pacifist constitution.</p>
<p>Fewer than 25% of Japan's people live in rural areas. Life for the majority
on the four principal islands is in sprawling conurbations on overcrowded
coastal plains, which surround mountainous, wooded interiors.</p>
<p>FACTS</p>
<p><br />
OVERVIEW ¦ FACTS ¦ LEADERS ¦ MEDIA</p>
<p> * Population: 127.8 million (UN, 2004)<br />
* Capital: Tokyo<br />
* Area: 377,864 sq km (145,894 sq miles)<br />
* Major language: Japanese<br />
* Major religions: Shintoism, Buddhism<br />
* Life expectancy: 78 years (men), 85 years (women) (UN)<br />
* Monetary unit: yen<br />
* Main exports: Vehicles, computer parts, chemicals, scientific instruments
and watches<br />
* GNI per capita: US $34,510 (World Bank, 2003)<br />
* Internet domain: .jp<br />
* International dialling code: +81</p>
</div>
<div class="headfoot">THIS IS A BIG FOOTER</div>
</body>
</html>
Anyway, this works beautifully, thanks very much for your help.