MrHyde Gaming
MrHyde Gaming

Reputation: 13

CSS text-align: center not working pls

 <div class="bgwhite" style="padding-top: 100px;">
     <div style="text-align: center">
       <center> pikachu </center>
     </div>   

I dont know what is going wrong :/

pls help

Upvotes: 0

Views: 41

Answers (2)

shisaq
shisaq

Reputation: 63

It seems you don't have the outer div tag closed. Add </div> to your snippet and try again.

By the way, it is not recommended using <center> tag anymore. Check this article for details. So your snippets should be like this:

<div class="bgwhite" style="padding-top: 100px;">
     <div style="text-align: center">
       pikachu
     </div>
</div>

Upvotes: 1

Subroto Biswas
Subroto Biswas

Reputation: 1

your code absolutely right check this code in another browser when I run your code it works perfectly

(sorry for bad English) chekout this output image

Upvotes: 0

Related Questions