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?

9th Jan 2019, 2:12 AM
Matheus Batista
Matheus Batista - avatar
4 odpowiedzi
+ 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
9th Jan 2019, 2:42 AM
voidneo
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
9th Jan 2019, 2:55 AM
Matheus Batista
Matheus Batista - avatar
0
Probably not because it's an old tag. What normally causes bugs are newer properties, which require relatively new web browsers
9th Jan 2019, 3:00 AM
voidneo
0
neo.h thanks
9th Jan 2019, 3:10 AM
Matheus Batista
Matheus Batista - avatar