調べているのですが、欲しいものを探す方法がわかりません。私は HTML と CSS の最初の学期にいます。私のページは 15 1/2 インチのモニターでは見栄えがしますが、19 1/2 インチのモニターに移動すると、背景画像の別の部分が右側に追加され、メニューバーが全体に引き伸ばされます。おそらく両側に色付きの(または空白の)境界線を追加して、より広い画面でページをそのまま維持するコードを探していますか?ご協力ありがとうございました。
助けてくれたブラッドとフィドルに感謝します。リピートなしは背景に役立ちましたが、より大きなモニターでは、メニューバーが明確になり、.box と img.posit が左端にくっつきます。背景画像に従って測定したままにしたいです。
これらのスタイルシート:
body {font-family:Arial, Verdana, Garamond;
background-image: beach.jpg; background-repeat: no-repeat; background-position: center;}
a {text-decoration: none;
color: #FF4D10; font-size: 14pt;}
a:hover {background-color: white;}
.menu {position:center;
text-align: center;
width: 100%; margin: 0; text-decoration: none;}
.menuword {width: 10%; background-color: beach.jpg; font-weight: 500; text-decoration: none;}
.menuwordselect {width: 10%; font-weight: bolder; font-style: italic; text-decoration: none;}
.menupipe {width: 0%; font-weight: bolder;}
.box {width: 400px; margin-left: 25px; margin-top: 100px; border-radius: 7px; background-color: #ffff9c; padding: 10px; color: #303032;}
/* set styles for class named box to position the image */
img.posit {position: relative; left: 550px; top: -435px }
/* sets styles for class named posit to position the image */
私は本当にあなたの助けに感謝します:)
ブラッド...これがページのコードです...
<body background="beach.jpg">
<div style="text-align: center;">
<img src="Oahu banner.jpg" width="995" height="295">
<table class="menu">
<tr>
<td class="menuword"><a href="sitemap.html">Waikiki</a></td>
<td class="menupipe">|</td>
<td class="menuword"><a href="script.html">North Shore</a></td>
<td class="menupipe">|</td>
<td class="menuword"><a href="cast.html">Cultural and Historical</a></td>
<td class="menupipe">|</td>
<td class="menuword"><a href="costumes.html">Best Deal Ever</a></td>
<td class="menupipe">|</td>
<td class="menuword"><a href="set.html">More Info</a></td>
<td class="menupipe">|</td>
<td class="menuword"><a href="props.html">Site Map</a></td>
</tr>
</table>
</div>
<div>
<p class="box">Oahu known as "The Gathering Place", is the third largest of the Hawaiian Islands and home to more than 950,000 people, almost 75% of the U.S. state of Hawaii's population. The state capital, Honolulu, is on Oahu's southeast coast. In the greatest dimension, this volcanic island is 44 miles (71 km) long and 30 miles (48 km) across. The length of the shoreline is 227 miles (365 km). The island is the result of two separate shield volcanoes: Wai'anae and Ko'olau, with a broad "valley" or saddle, the Oahu Plain between them. The highest point is Mt. Ka'ala in the Wai'anae Range, rising to 4,003 feet (1,220 m) above sea level.
<br><br>
But there is more to Oahu than just height and width. Honolulu, the state's capital, not only displays an impressive skyline of highrises, but also the beautiful beach of Waikiki, where Duke Kahanamoku "the father of surfing" developed his surfing and swimming skills.
<br><br>Across the pineapple fields at the middle of the island, the North Shore is home to modern day world renown surfing competitions, prolific fruit plantations and a quiet, rural lifestyle for many residents.
<br><br>The cultural heritage of the native peoples is richly preserved in many world class museums, libraries and attractions. Pearl Harbor as an important piece of our American history is a must see stop for all visitors.
<br><br>There is something for everyone on this beautiful tropical island. Come vist and Hang Loose in Oahu!</p>
<img class="posit" src="waterfallbig.jpg" width="513" height="386" alt="Waterfall" />
</div>
</body>