How To Fixed Position In Css: Page Layouts


show more Fixed positioning provides you with in-depth training on Web. Taught by James Williamson as part of the CSS: Page Layouts show less
please wait ...

Fixed positioning

Fixed positioning is part of the absolute positioning model, and it allows you to position element relative to the viewport. Unlike relative or absolute positioning, fixed positioning wasn't initially supported very well by browsers, which is why it's not quite as well known as absolute or relative positioning. However, the reason increase in support, especially among mobile devices, means that fixed positioning is beginning to see widespread use among designers. Now to demonstrate fixed positioning, I have the fixed.htm file open from the 04_03 directory, and if I scroll down, I can see that we are pretty much using the same file that we've been using for the past couple of exercises.

We have our three elements, elements 1, 2, and 3, and they are wrapped in our section, with the class attribute of container. Okay, so I am going to go up to element 1 here, and let's just go ahead and set position for that to fixed. Now since we understand the concept of offsets now, we will ...

Fixed positioning
Video duration: 4m 23s 8h 57m Beginner

Viewers:

Fixed positioning provides you with in-depth training on Web. Taught by James Williamson as part of the CSS: Page Layouts

Subject:
Web
Software:
CSS
Author:
please wait ...