私はクラスの割り当てに取り組んでいますが、ブラウザのサイズを変更したときに移動するアンカータグがあります。ペングラフィック上に配置したままにしておきたいと思います。 http://chrisallie.com/index.html
ありがとう!
CSS:
#contact {
position: fixed;
display: block;
font-family: Century Gothic;
text-decoration: none;
text-align: center;
font-size: 18px;
font-weight: bold;
color: rgb(0, 0, 153);
transform: rotate(-77deg);
line-height: 30px;
width: 150px;
height: 20px;
margin: -300px 0px 0px 1335px;
}
HTML:
<div id="main-content">
<a href="index.html" id="home">Home</a>
<a href="index.html" id="webcoding">Web<br />Coding<br />seminar<br /><span>Don"t miss!</span></a>
<a href="index.html" id="javascript">Javascript<br />10:00</a>
<a href="index.html" id="photoshop">Photoshop<br />Lesson 01 due!</a>
<a href="index.html" id="illustrator">guest speaker<br />Illustrator<br />2:00-3:00</a>
<a href="index.html" id="php">PHP<br />5:00-10:00</a>
</div>
<a href="index.html" id="contact">Drop us a line!</a>
回答:
回答№1は1アンカータグを内側に移動 <div id="main-content">
それから与える #main-content position:relative
そしてアンカーを与える position:absolute
(固定位置のものをすべて削除します)
これで、アンカーを基準にしてアンカーを配置できます。 #main-content
div、あなたはそれに負の値を与える必要があるでしょう right
しかし、私はそれがこの場合避けられないかもしれないと思います。
アンカータグの右と下(または上)の値を微調整する必要がありますが、上記を使用して調整できます。
回答№2の場合は0
- divに "Drop a a line"を移動してください
- 追加
position:relative
#メインコンテンツへ