私がやりたいことは、投稿とページの上部にあるオプトイン ボックスの div を横に広げることです。CSS の width:100% 属性を使ってやりたかったのですが、途中までしか伸びていませんでした。
そのため、手動で幅を 100% になるピクセル数に設定しました。しかし、それによる問題は、iPhone/iPad で表示の問題が発生することです。
スケールに合わせて iPhone/iPad で div の幅を変更する方法はありますか? どうすればこれを行うことができますか?
ありがとうございました!
リズ
コード - -
.page-opt {
margin-left:-314px;
width:1583px;
clear: both;
margin-bottom:-20px;
padding-bottom:-20px;
position: relative;
}
/* Non-Retina */
@media screen and (-webkit-max-device-pixel-ratio: 1) {
margin:0;
}
/* Retina */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5) {
margin:0;
}
/* iPhone Portrait */
@media screen and (max-device-width: 480px) and (orientation:portrait) {
margin:0;
}
/* iPhone Landscape */
@media screen and (max-device-width: 480px) and (orientation:landscape) {
margin:0;
}
/* iPad Portrait */
@media screen and (min-device-width: 481px) and (orientation:portrait) {
margin:0;
}
/* iPad Landscape */
@media screen and (min-device-width: 481px) and (orientation:landscape) {
margin:0;
}