# Trying to understand the layout of Technical Documentation Project example

**URL:** <https://forum.freecodecamp.org/t/trying-to-understand-the-layout-of-technical-documentation-project-example/315887>\
**Category:** General\
**Created:** [September 20, 2019, 1:28pm UTC](https://forum.freecodecamp.org/t/trying-to-understand-the-layout-of-technical-documentation-project-example/315887 "2019-09-20T13:28:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![El\_Escandalo](https://avatars.discourse-cdn.com/v4/letter/e/d6d6ee/32.png) [@El\_Escandalo](https://forum.freecodecamp.org/u/El_Escandalo)\
**Post date:** [September 20, 2019, 1:28pm UTC](https://forum.freecodecamp.org/t/trying-to-understand-the-layout-of-technical-documentation-project-example/315887/1 "2019-09-20T13:28:15Z")

</div>

I’m working on the Technical Documentation Page project, specifically trying to figure out how to set the layout so the navbar remains on the left side of the screen. FCC gives this pen as an example:

[https://codepen.io/El\_Escandalo/pen/PoYxWMd?editors=1100](https://codepen.io/El_Escandalo/pen/PoYxWMd?editors=1100)

FCC also made this video as a guide, which employs CSS grid for the layout (at the 16:05 point in the video).

But the example pen does not seem to use the grid. It seems to me the two examples are using different methods. I realize there are many ways to layout a page, I’m just trying to understand one of them to start with.

How is the example pen (the one not using the grid) being laid out? I’m not concerned right now with the more “detail” stylings such as padding etc.- just trying to figure out what CSS is making the navbar remain on the left, and main section on the right. I made the navbar fixed and tried to make the main section relative to it, but it doesn’t push the main section to the side of the navbar… Thank you

---

<div class="post-metadata">

**Author:** ![Sky020](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sky020/32/128093_2.png) [@Sky020](https://forum.freecodecamp.org/u/Sky020)\
**Post date:** [September 20, 2019, 1:41pm UTC](https://forum.freecodecamp.org/t/trying-to-understand-the-layout-of-technical-documentation-project-example/315887/2 "2019-09-20T13:41:09Z")

</div>

For the CodePen:  
The main CSS affecting the navbar is:

```css
#navbar {
  position: fixed;
  min-width: 290px;
  top: 0px;
  left: 0px;
  width: 300px;
  height: 100%;
  border-right: solid;
  border-color: rgba(0, 22, 22, 0.4);
}

```

`position: fixed;`  
Causes the navbar to be _fixed_ to the defined area of the **window**.  
`top: 0px; left: 0px;` Tells the navbar to be positioned at those co-ordinates of the **page**.

That is all there is to it. Just make sure your _html_ is layed out correctly, and the additional elements should line up.

Perhaps, make sure you have defined the `width` and `height` properties of your _main_ section.

---

<div class="post-metadata">

**Author:** ![El\_Escandalo](https://avatars.discourse-cdn.com/v4/letter/e/d6d6ee/32.png) [@El\_Escandalo](https://forum.freecodecamp.org/u/El_Escandalo)\
**Post date:** [September 20, 2019, 8:34pm UTC](https://forum.freecodecamp.org/t/trying-to-understand-the-layout-of-technical-documentation-project-example/315887/3 "2019-09-20T20:34:28Z")

</div>

@Sky020 What is the difference between the **window** and the **page**?

---

<div class="post-metadata">

**Author:** ![Sky020](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sky020/32/128093_2.png) [@Sky020](https://forum.freecodecamp.org/u/Sky020)\
**Post date:** [September 21, 2019, 7:45am UTC](https://forum.freecodecamp.org/t/trying-to-understand-the-layout-of-technical-documentation-project-example/315887/4 "2019-09-21T07:45:34Z")

</div>

The _page_ is your whole HTML that is loaded on the site. Your _window_ is defined by your browser. Usually, the page is longer than your window.

Unless `position` is `fixed`, the DOM are fixed to the page, not the window.

---

<div class="post-metadata">

**Author:** ![El\_Escandalo](https://avatars.discourse-cdn.com/v4/letter/e/d6d6ee/32.png) [@El\_Escandalo](https://forum.freecodecamp.org/u/El_Escandalo)\
**Post date:** [September 21, 2019, 1:54pm UTC](https://forum.freecodecamp.org/t/trying-to-understand-the-layout-of-technical-documentation-project-example/315887/5 "2019-09-21T13:54:50Z")

</div>

@Sky020 Thanks. Ok, so theoretically if I zoomed the _window_ out, then I could see the whole _page_? But at normal zoom, if there is lots of content, a _window_ won’t be entirely visible on the _page_?

So in this sense, does the `fixed` attribute differ from `absolute` and `relative` in that it is positioned in relation to the _window_ rather than the _page_? Thank you

---

<div class="post-metadata">

**Author:** ![Sky020](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sky020/32/128093_2.png) [@Sky020](https://forum.freecodecamp.org/u/Sky020)\
**Post date:** [September 21, 2019, 5:20pm UTC](https://forum.freecodecamp.org/t/trying-to-understand-the-layout-of-technical-documentation-project-example/315887/6 "2019-09-21T17:20:57Z")

</div>

Yes, that is correct.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 9:28am UTC](https://forum.freecodecamp.org/t/trying-to-understand-the-layout-of-technical-documentation-project-example/315887/7 "2021-01-17T09:28:06Z")

</div>

Closed on January 17, 2021, 9:28am UTC


