I have three doubts about css, pixel display | Sololearn: Learn to code for FREE!

0

I have three doubts about css, pixel display

Are the default elements DISPLAY block? Or is not it all kind? <a> is it inline? AND <p> Is it block? I used a text-align: center; To centralize a div and worked is it okay to do this? What problems can it have in the future? The type % helps us programmers q make responsive site and say that the vh, see help too, but then what is doubt I used them however they are fixed values equal the Px is it? Even what I understood?

1/9/2019 2:12:51 AM

Matheus Batista

4 Answers

New Answer

+1

The display property changes from element to element. Display block, causes that the element(s) that follow the one that has the property, to be under it, and not to its right. For example, the span element, it hasn't display block by default. The element a I think is inline as well. About centering a div, it depends on the effect you want to achieve. For example, if you want the element to be centered even if its container changes size, the you should use percentages. I don't really know what to say about doing it with text align

0

neo.h I understand but the question is that I was testing some things and I know there are other methods to centralize a div with its contents only that I used in the parent div text-align: center; and without understanding it has centered on the thought, can this lead to a future error? or it's just a bug

0

Probably not because it's an old tag. What normally causes bugs are newer properties, which require relatively new web browsers

0

neo.h thanks