반응형

 

 

 

 

https://stackoverflow.com/questions/36182635/making-a-flex-item-float-right" target="_blank" rel="noopener" data-mce-href="http:// https://stackoverflow.com/questions/36182635/making-a-flex-item-float-right">http:// https://stackoverflow.com/questions/36182635/making-a-flex-item-float-right 

 

Making a flex item float right

I have a <div class="parent"> <div class="child" style="float:right"> Ignore parent? </div> <div> another child </div> </div> The parent has .parent {...

stackoverflow.com

스택오버플로우를 읽어보시면 알 수 있습니다.

 

결론: float: right 대신 margin-left: auto를 사용하면 해결할 수 있다.

반응형

'Front-End > CSS' 카테고리의 다른 글

[CSS] div내 요소 중 float:right 이탈 문제 해결  (0) 2023.06.18
[CSS] vw, vh란?  (0) 2023.04.10
Flexbox의 모든 것 (display: flex)  (0) 2023.02.15
Layout: display와 position  (0) 2023.02.13
Selector란? (feat. margin, padding)  (1) 2023.02.12