samedi 27 juin 2015

Why isn't text-aling working?

Well, i'm trying this code:

.Saludo {
  width:100%;
  display:block;
  text-aling:center;
  font-family: "Times New Roman", Times, serif;
  font-size:75px;
  color:#208CB7;
 }

The idea is that the text should be in the middle of the screen but it doesn't move from the left corner. The css is working because it changes his colour and size, only the position isn't working.

Also, the text is being created from this:

function Saludo(){
  var f = new Date();
  hora = f.getHours();

  if(hora=>22 || hora<7){
    document.write('<span class="Saludo">Buenas Noches</span>');
  }else if(hora=>7 && hora<=14){
    document.write('<span class="Saludo">Buenas Dias</span>');
  }else{
    document.write('<span class="Saludo">Buenos Tardes</span>');
  }
}

The html looks like this. It calls the script shown above and creates the span:

<div id="Saluo">
    <script type="text/javascript" src="js/default.js"></script>
</div>




Aucun commentaire:

Enregistrer un commentaire