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 for this tribute project.
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…
It is because the Bootstrap class row has a -15px left and right margin. You can test this by writing:
.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.
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!