0

how to float three div side by side ?

12th Jul 2016, 8:24 PM
Jafar Majroh
Jafar Majroh - avatar
5 ответов
+ 1
Add the 'float: left' style and control spacing between them through 'margin' style. Don't forget to clear the float for the element that comes after these divs: 'clear: left'.
12th Jul 2016, 11:04 PM
ZinC
ZinC - avatar
0
try display: flex; and flex box properties
12th Jul 2016, 11:36 PM
Sósthenes Neto
Sósthenes Neto - avatar
0
to zinc: please, I tried in other web-editor, seems clear float is not working? the following contents keep to the margins side of the last floated elements, you think anything wrong?
13th Jul 2016, 5:05 AM
Alexis Cheuk Yan Lee
Alexis Cheuk Yan Lee - avatar
0
@Cheukyan Did you try clear: both;? Sorry for the late answer.
20th Jul 2016, 12:59 PM
ZinC
ZinC - avatar
- 1
well, u could also try setting the display property of the element and its siblings to inline-block just like this ; (selector){ display : inline-block; }
23rd Jul 2016, 1:11 AM
Sylvester Nkeze