Answer the question
In order to leave comments, you need to log in
Bootstrap layout, what SHOULD be improved and how to set styles correctly?
In general, I use mdbootstrap5. It seems to have done everything, but now there are a couple of questions.
1. Let's say we have a mask for blocks-> mask, but the documentation sets the styles for the mask directly in html. Is it worth it to do so?
<div class="mask" style="background-color: rgba(0, 0, 0, 0.4);">
////////////////////////////////////
</div>
<div class="newsMain text-center text-white"> (не в кашу классов, а в id)<blockquote>/<div class="text-center text-white" id="newsMain "> </blockquote>
<h2>TES TEST TEST</h2>
<p id="newsDescription">Lorem Lorem Lorem Lorem</p>
<button type="button" class="btn btn-danger">Читать дальше</button>
</div>
@media screen and (max-width: 473px){
#newsDescription{
display: none;
}
#newsMain{
margin-top: 1.5rem;
}
}
Answer the question
In order to leave comments, you need to log in
1. If there are really a lot of styles, then you should set your own class, and if the site is small, then it is quite possible to use inlines.
2.No
3.No, this will break blocks in other places, it's better to create your own class and add it where necessary, or use inlines, unless, of course, as in your case, it's just a mask.
Usually, only the grid is used in the boots, and if you decide to make a unique project on the boots, then only rebuilding the bootstrap itself for your needs, this will give the maximum profit from the framework, and you will not have such questions. All the best!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question