コンテンツの整列にはいくつかの助けが必要です。女性のイメージは左揃えと右揃えにする必要があります。イメージとテキストをCSSのみで整列する
これはCSS Zen Gardenです。つまり、はCSSのみを使用でき、HTMLは編集できません。あまりにも多くのマージンやパディングを使用せずに、それを行う方法はありますか?私はHTMLを変更することができますが、私はそれをフロートしますが、ここでそれは可能ではありません...
私は背景位置で画像を配置します。ここ
/*eerste section*/
.preamble h3 {
font-family: fraktur;
font-size: 15em;
color: #4A4A4A;
margin: 5%;
}
.preamble {
/* width: 80%; */
display: grid;
grid-template-columns: 1fr;
margin: 50px auto;
/* border: 2px solid #000000; */
background-image: url('../images/foto1.png');
background-repeat: no-repeat;
/*background-size: contain;*/
background-size: 40%;
background-position: 93% 82%;
}
.preamble p {
width: 47%;
margin: 15px 40px;
}
/*einde eerste section*/
/*tweede section*/
.explanation h3 {
font-family: baskerville;
font-weight: 100;
font-size: 10em;
width: 45%;
color: #4A4A4A;
margin: 5%;
}
.explanation {
/* width: 80%; */
display: grid;
grid-template-columns: 1fr;
margin: 50px auto;
/* border: 2px solid #000000; */
background-image: url('../images/dame.png');
background-repeat: no-repeat;
background-size: contain;
background-position: 93% 82%;
}
.explanation p {
width: 47%;
margin: 15px 40px;
}
/*einde tweede section*/
方向:RTL。この場合には使用する必要はありません。 https://developer.mozilla.org/en-US/docs/Web/CSS/direction –
なぜですか?すべての要素の方向を変えるのは簡単なトリックです。 @ Lucas.S – Pedram
グリッドレイアウトはあなたにそれを正しく作るためのツールを与えます:)方向を使用しようとしないでください:rtl;そこの位置を変更するには、あなたはする必要はありません。 –