In html if you align text to the right, then its size is reduced

Beantwortet In html if you align text to the right, then its size is reduced

  • Donnerstag, 3. Mai 2012 13:00
     
      Enthält Code
    I found a problem with displaying html in the built-in browser (IE) windows phone 7.
    In html if you align text to the right, then its size is reduced.

    Sample html:
    <!DOCTYPE html>
    <html> 
      <head>  
        <meta charset="utf-8">  
        <title>text-align</title>  
        <style>   
          div {    
            border: 1px solid black; /* Параметры рамки */    
            padding: 5px; /* Поля вокруг текста */    
            margin-bottom: 5px; /* Отступ снизу */   
          }   
          #left { text-align: left; }   
          #right { text-align: right; }   
          #center { text-align: center; }   
          .content {        
            font-size: 20px;        
            width: 75%; /* Ширина слоя */        
            background: #fc0; /* Цвет фона */   
          }  
        </style> 
    </head> 
    <body>  
      <div id="left"><div class="content">Выравнивание по левому краю</div></div>  
      <div id="center"><div class="content">Выравнивание по центру</div></div>  
      <div id="right"><div class="content">Выравнивание по правому краю</div></div> 
    </body>
    </html>

    Third row is displayed incorrectly

Alle Antworten