# Tribute help with responsive class .row

**URL:** <https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232>\
**Category:** General\
**Created:** [February 12, 2018, 6:58pm UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232 "2018-02-12T18:58:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnT48](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AnT48](https://forum.freecodecamp.org/u/AnT48)\
**Post date:** [February 12, 2018, 6:58pm UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/1 "2018-02-12T18:58:59Z")

</div>

I’m working on this first project with a mix practice of semantic tags and bootstrap. However, I don’t know why the border of the div mainInfo with class .row keeps getting out of the the root div with class .container-fluid. I need to divide into sections inside that div mainInfo later.

Could anyone please help me? Here is my [codepen](https://codepen.io/annieT/pen/ddRMNq?editors=1100) for this tribute project.

Thanks,  
AnT

---

<div class="post-metadata">

**Author:** ![borntofrappe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/borntofrappe/32/273293_2.png) [@borntofrappe](https://forum.freecodecamp.org/u/borntofrappe)\
**Post date:** [February 12, 2018, 7:06pm UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/2 "2018-02-12T19:06:48Z")

</div>

Maybe I can help. As I see it you declared the class of `container-fluid` on a header tag instead of a div.

```auto
<h2 class="container-fluid">

```

Instead of:

```auto
<div class="container-fluid">

```

Additionally, there is one closing div in excess in the end of the HTML structure:

```auto
<div class="mainInfo row"> Main info
        </div>
</div>

```

But maybe that’s just there because you are articulating the main info.

Hope I was of some help :).

---

<div class="post-metadata">

**Author:** ![AnT48](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AnT48](https://forum.freecodecamp.org/u/AnT48)\
**Post date:** [February 13, 2018, 12:16am UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/3 "2018-02-13T00:16:20Z")

</div>

Thanks for helping me. I did make a mistake with `<h2>` tag and have fixed it, but the `<div class="mainInfo row">` is still out of border. I don’t know why it does not fit if I add class `row` in it.  
I can change all semantic tags to div but I would like to practice with semantic tags as well…

Please help~

---

<div class="post-metadata">

**Author:** ![AnT48](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AnT48](https://forum.freecodecamp.org/u/AnT48)\
**Post date:** [February 13, 2018, 12:39am UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/5 "2018-02-13T00:39:37Z")

</div>

Thanks for reply, @camperextraordinaire, but the border of the `div` still not within the `<div class="contain-fluid">`…

---

<div class="post-metadata">

**Author:** ![camperextraordinaire](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@camperextraordinaire](https://forum.freecodecamp.org/u/camperextraordinaire)\
**Post date:** [February 13, 2018, 12:44am UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/6 "2018-02-13T00:44:41Z")

</div>

It is because the Bootstrap class **row** has a -15px left and right margin. You can test this by writing:

```auto
.row { margin: 0;}

```

and the row will be contained like you are expecting.

Whenever in doubt of what styles have been applied to an element, you can right-mouse click the element and select Inspect (in Chrome) and then click on Computed to see all the properties with values.

 ![image](https://global.discourse-cdn.com/freecodecamp/original/3X/9/b/9b8531b3cd02c1102bf19bc631b91951af071a57.png)

---

<div class="post-metadata">

**Author:** ![AnT48](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AnT48](https://forum.freecodecamp.org/u/AnT48)\
**Post date:** [February 13, 2018, 12:58am UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/7 "2018-02-13T00:58:47Z")

</div>

Thank you so much! It works!  
@camperextraordinaire, if you don’t mind, could you tell me where you find the source to fix this issue? I look through bootstrap site to find this info about class `row` but cannot find it.  
Thanks!

---

<div class="post-metadata">

**Author:** ![AnT48](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AnT48](https://forum.freecodecamp.org/u/AnT48)\
**Post date:** [February 13, 2018, 1:09am UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/9 "2018-02-13T01:09:33Z")

</div>

Thanks @camperextraordinaire, but I have another question, why can’t this code below work:

```auto
<div class="mainInfo row">
          <div class="col-xs-8">info</div>
          <div class="col-xs-4">Side bar</div>
 </div>

```

but this one works:

```auto
<div class="mainInfo row">
          <div class="col-8">info</div>
          <div class="col-4">Side bar</div>
</div>

```

Thanks

---

<div class="post-metadata">

**Author:** ![AnT48](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@AnT48](https://forum.freecodecamp.org/u/AnT48)\
**Post date:** [February 13, 2018, 1:16am UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/11 "2018-02-13T01:16:33Z")

</div>

Thanks again for your explanation. I really appreciate your help 🙂

---

<div class="post-metadata">

**Author:** ![borntofrappe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/borntofrappe/32/273293_2.png) [@borntofrappe](https://forum.freecodecamp.org/u/borntofrappe)\
**Post date:** [February 13, 2018, 8:21am UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/13 "2018-02-13T08:21:15Z")

</div>

Sorry for not getting back to you sooner, I guess there’s a time zone difference.

Indeed as @camperextraordinaire explained, far more eloquently than I ever could, it’s about the sometimes quirky default settings of bootstrap.

Thank you @camperextraordinaire, always available.

---

<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, 8:27pm UTC](https://forum.freecodecamp.org/t/tribute-help-with-responsive-class-row/174232/14 "2021-01-17T20:27:16Z")

</div>

Closed on January 17, 2021, 8:27pm UTC


