Example
float : https://www.w3schools.com/css/css_float_examples.asp
https://www.w3schools.com/css/tryit.asp?filename=trycss_float_boxes_flex
c0de <!DOCTYPE html><html>
<head>
<style>
.flex-container {
display: flex;
flex-wrap: nowrap;
background-color: DodgerBlue;
}
.flex-container .box {
background-color: #f1f1f1;
width: 50%;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
}
</style>
</head>
<body>
<h1>Flexible Boxes</h1>
<div class="flex-container">
<div class="box">Box 1 - This is some text to make sure that the content gets really tall. This is some text to make sure that the content gets really tall.</div>
<div class="box">Box 2 - My height will follow Box 1.</div>
</div>
<p>Try to resize the browser window to see the flexible layout.</p>
<p><strong>Note:</strong> Flexbox is not supported in Internet Explorer 10 or earlier versions.</p>
</body>
</html>
Code snippets for HTML, CSS and JavaScript
; https://www.w3schools.com/howto/default_page6.asp
ตัวอย่างจัด 1 บรรทัด มีทั้ังซ้ายและขวา โค้ดที่เพจ
ตัวอย่างหน้าเว็บ https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_example_website