cssのwidthって左上からのサイズになっちゃうけど、右からのサイズにできないんですかね?
cssのwidthって左上からのサイズになっちゃうけど、右からのサイズにできないんですかね? max-widthでも同じようにできる方法があれば教えてください
右からというか、右合わせのということです
HTML、CSS・32閲覧
ベストアンサー
駄犬さん >・・・右からのサイズにできないんですかね?・・・・・ ご参考に↓ <!DOCTYPE html> <meta charset="UTF-8"> <html> <style> .wrap{ background:#eee; height: calc(100vh - 16px); display:flex; flex-direction:column; align-items:flex-end; } .wrap img{ max-width:30%; } .wrap .inbox{ width:20%; background:#fdd; } </style> <body> <section class="wrap"> <img src="https://s.yimg.jp/images/ks/official/nt/grd/prf_150.png" > <div class="inbox"> cssのwidthって左上からのサイズになっちゃうけど、右からのサイズにできないんですかね? </div> <img src="https://s.yimg.jp/images/ks/official/qa/ico_no_avater.gif" > </section> </body> </html>
質問者からのお礼コメント
完璧です!
お礼日時:1/16 16:40