VibrationPositive
VibrationPositive

Reputation: 410

Why is this text not aligning to the center for mobile?

Here is the body text. There are no other css or html commands indicating alignment.

Here is the jsfiddle: https://jsfiddle.net/9t4afmx3/

Why is it aligning to the left for mobile?

<body>

<p align="center"><img src="Screen Shot 2016-05-04 at 12.40.50 PM.png" width="1280" height="434.6" usemap="#Map" align="center" border="0" />
  <map name="Map" id="Map">
 <area shape="rect" coords="56.7,340.1,344.8,434.6" href="ourteam" />
 <area shape="rect" coords="472.37,340.1,755.8,434.6" href="ourservices" />
 <area shape="rect" coords="944.7,340.1,1228.15,434.6" href="aboutchillcreatives" />
  <area shape="rect" coords="472.30,500,804,5150" href="ourservices" />
 </map>
 </p>


<div align="center">
<pre class="chillfont"><span class="chillfont">CHILL CREATIVES IS</span>

  <span class="chillfont">FORFRONT...</span><span class="BLACKWHITE">IN AN
  </span><span class="BLACKWHITE">UNEQUIVOCALLY
 </span><span class="BLACKWHITE">CHILL FASHION.</span>
 <a href="ourservices">
 <img src="Screen Shot 2016-05-03 at 5.12.26 PM.png"   width="1200" height="1000"/>
 </a>
 </div>
 </body>
 </html>

Upvotes: 0

Views: 52

Answers (2)

Dimitri Lavren&#252;k
Dimitri Lavren&#252;k

Reputation: 4879

there is no align attribute in a div or a p element. this code is wrong:

<div align="center">

you can use

<div style="text-align:center">

for centering the text

Upvotes: 2

bendouglas
bendouglas

Reputation: 147

Try style = "text-align: center" instead.

Upvotes: 1

Related Questions