2011-10-21 7 views
0

私はHTMlコースの中間プロジェクトを終了しています。私は最後のページで作業しています。問題は、テーブルが右にオーバーフローする(ブラウザが最大化されていない)場合、私はそれを修正する方法を見つけることができません。誰も助けることができますか?HTMLページのオーバーフローテーブル

私は写真を投稿できません。 (ノー担当者)

HTML:

<div id="rightcolumn"> 
<h2>Fuel Cells</h2> 
    <!--3 Column by 3 Row Layout using a Table--> 
    <table width="100%" border="0" cellpadding="6"> 
    <caption>Fuel Cells as a Source of Green Energy</caption> 
    <tr> 
    <td colspan="3">The research and development of fuel cells is extremely important. Fuel cells are an important technology because they use hydrogen to create energy. Hydrogen is the most plentiful element in our universe, quite unlike oil. If the US ran on fuel cells we would finally be independent from oil. Also, hydrogen doesn&rsquo;t need to be &ldquo;mined&rdquo; like oil. If we no longer needed oil we would save on the price we have been paying for decades. Hydrogen is both extremely abundant and a renewable resource. If hydrogen was used as our primary power source we wouldn&rsquo;t ever need to worry about running out of it, like we do with oil and other fossil fuels. A cloudy day can stop solar panels from generating much electricity and a still day can stop wind power. With hydrogen however, weather wouldn&rsquo;t affect the quantity of power fuel cells produce. This makes fuel cells far more reliable than other, alternative forms of &ldquo;green&rdquo; energy. 
    </td> 
    </tr> 
    <tr> 
    <td ><img src="FuelCellDiagram.png" width="335" height="232" alt="How Fuel Cells Work" /></td> 
    <td><img src="FuelCellhome.png" width="345" height="250" alt="Fuel Cell Powering Home" /></td> 
    <td><img src="FCCar.GIF" width="400" height="347" alt="How Fuel Cells power Cars" /></td> 

    </tr> 
    <tr> 
    <td colspan="3">Fuel cells are important because of their harmless byproducts. Water and heat, the byproducts, aren&rsquo;t dangerous and could actually be useful. The heat generated by fuel cells could be used to heat homes or water, making fuel cells even more efficient. Fuel cells would allow us to power our cars as well as our homes. This would lead to an end of the use of gasoline or battery powered vehicles. Although cars are becoming more efficient, they are unable to match the efficiency of fuel cells. Our current gas powered vehicles produce harmful pollutants during fuel combustion. Battery powered vehicles are also harmful because of the pollutants that are byproducts of both creating and disposing of them. If the world could end its dependence on oil and transition to fuel cells, our pollution levels would be a fraction of what they are now. In China, many cities are filled with smog because of the way they are powered. If China were to replace their coal plants with fuel cells, the ever increasing smog throughout China would begin to fade. Also, we would no longer have to worry about pollution from oil spills or oil wells. 
    </td> 
    </tr> 
</table> 
<!--End of Columns/Table--> 

</div> 

とCSSは次のとおりです。

#container { 
     margin: auto; 
     width:80%; 
     min-width:700px; 
    background-color:#93A5C4; 
    color:#000000; 
    border: 2px double #000000; 
} 
#rightcolumn { 
     margin-left:140px; 
     background-color:#ffffff; 
    color:#000000; 
    padding:10px; 
} 
td, tr, th { 
padding: 10px; 
margin-left:auto; 
margin-right:auto; 
text-align: left; 
} 

私は他のページを表示するには、そのようにそれを必要とするので、私も右列のCSSを編集することはできません適切に、私はサイト全体に1枚のCSSシートしか使用できません。

+1

ID「container」のHTMLは存在しないようで、「rightcolumn」DIVは表全体を囲んでいます。これはあなたが意図したものですか? – Blazemonger

答えて

1

右の列divの宣言で、「オーバーフロー:スクロール」のスタイルを追加するのが簡単な解決方法です。

<div id="rightcolumn" style="overflow:scroll"> 
+0

ありがとう、それは多くの助けになります!他の誰かが知っていれば、より良い修正が私に教えてください! – cmorris1441

+0

このページには完全なHTMLとCSSを投稿できますか?これは、可能な他の解決策を明らかにするのに役立ちます。 –

+0

ここにはすべてのものへのリンクがあります。私が問題を抱えているのは、「燃料電池」のページです。今すぐスクロールしますが、上で推奨されているオーバーフロースタイルを削除すると、意味がわかります。 – cmorris1441