Duration: 18:31 min
Summary: In this video, we will talk about centering and floating. First, we will start with centering elements on the screen. We will have an article and an image. We will set some of the basic CSS properties for the main elements. But more importantly, we will tackle the margin by setting the top and bottom margin and let the left and right be auto. By doing so for the article and the image, both items will be centered on the screen. Then we will discuss how floating work. We will have two articles and two images. By default they display from top to bottom. But by changing the float and margin properties for the corresponding elements we will see how the text will have enough space to be displayed around the image. In the first, the image will float to the left, and in the second it will float to the right. We will use the margin to control the space between the image and the article.
Technologies and Resources: CSS, HTML, Notepad++, CSS3, background-color, margin, padding, border, width, display, float, img, article.