+ 5
text-align:center not working in header and footer
can any one tell me why is it not working. i have attached my code below https://code.sololearn.com/W1qZV1I6hE2I/?ref=app
9 Réponses
+ 3
You many times duplicated css code.
Why you use comma separated common styling, if you just after that use another style for the same element?
CSS cascade-style-sheets.
Which mean the last style cover previous style. Mingbai?
in first:
text-align: center /* correct */
in second:
text-align: centre /* wrong */
+ 4
There is a comma after section in "header,footer,section,"
+ 2
it's spelled "center" and not "centre"
+ 1
Rohit got it dude thnx
+ 1
Here is my dummy landing page. You can look at css to see what happen.
https://code.sololearn.com/WkUOocFatNx3/?ref=app
+ 1
Shadoff are you mean selecting an element multiple times (for different purposes) is wrong?!!
sometimes we can select an element multiple times. because it and other elements have shared properties.
0
I wrote center in the code tho
0
Jagroop Singh Check your CSS line 10 and line 18 it's spelled "centre" and not "center".
0
try & select
h1 {
text-align :center;
}
not this
header{
text-align :center;
}