Aligning Divs Side by Side CSS & HTML tutorial

by | Jun 2, 2021 | 0 comments

Aligning Divs Side by Side CSS & HTML tutorial

by | Jun 2, 2021 | CSS Tips and Tricks | 0 comments



in this video, I will show you how to place three DIVS beside each other using HTML AND CSS. It is easy to accomplish that, and you need to pay attention to the percentages of the width. All divs by default are 100%. if you divide it by three, the results will be 33.33% Set the width of each div to 33.33%. Float the left Div to left. float: left; float the right DIV to right float:right; and to center the middle div, just add margin: 0 auto; This way the divs should be placed next to each other smoothly. Also, if you want to add more width to a specific DIV, basically, decrease the percentage from one Div and add it to the other DIV.

#webDesign #CSS #html

source