From the course: CSS Shorts

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

What’s your position?

What’s your position? - CSS Tutorial

From the course: CSS Shorts

What’s your position?

- [Chris] Hi, this is Chris Convers, and in this episode, we'll be taking a look at the position property and how this allows us to change the relationship between HTML elements on our page. Now by default, HTML elements flow in the browser in the same order they appear in the HTML file, and elements flow after and around each other throughout the document. The position property allows us to place elements with pixel-level precision anywhere within the HTML document. Now you can take control over which HTML elements control our positioned elements by assigning positioning properties to that element's parent. So if you'd like to follow along with me, download the exercise files and let's start by opening the index.html file in the text editor. So here in the HTML file, you'll see that we have a partial layout set up. In addition to opening this in the text editor, you can also open index.html up in a browser. My text editor has a built-in preview so I'll use that. And in the browser…

Contents