I’m having a really hard time understanding the layout principles in bootstrap. I want all of my “h” tags centered on their own line at all levels of deprecation. I’ve tried out variations of col-12 and haven’t been able to make it work.
I also want the paragraph and photo to stack at either sm or xs.
i don’t recommend this, because this kind of code is hard to maintain, you need to play a lot with css.
if you want to use grid system, make sure every child element that belong to same parent have grid value
i give you example on how to use grid code based on your portfolio page, copy it to your html and css and see the difference. I hope this example can help you understands grid system better
HTML
Most of my divs had grid values but I’ve been plugging values in and taking them out pretty haphazardly. I’m also confusing bootstrap and flexbox, using little bits of both here and there. I need to be more methodical.
It looks like text-align: center; affects everything, not just text. If I wanted to right justify an item I would assign it a class or an ID and declare that property?
I’m glad it helped.Grid system is pretty confusing but once you able to grasp the concept, it will be really helpful especially for a responsive website
text-align: center;
yes, it can also affect another element such as image and button, a convenient way to organize your element
If I wanted to right justify an item I would assign it a class or an ID and declare that property?
unfortunately, it only works for paragraph (
), span () and div (
). If you try for image like this :
img {
text-align : right;
}
nothing will happen. But you can trick it by put the image element in a div