Visualizzazione dei risultati da 1 a 8 su 8

Discussione: Padding in FF

  1. #1

    Padding in FF

    codice:
    body {
    background-color: #97C236;
    text-align: center;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    }
    .corpo {
    width: 850px;
    background-color: #FFFFFF;
    padding-top: 2px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    }
    Aggiungendo un padding in body FF non lo "calcola" proprio. Come risolvo?
    Grazie

  2. #2
    Guarda che funziona:
    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml"><html>
    <head>
    	<title>
    		new3
    	</title>
    </head>
    <style type="text/css" />
    body {
    background-color: #97C236;
    text-align: center;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    }
    .corpo {
    width: 850px;
    background-color: #FFFFFF;
    padding-top: 2px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    }
    </style>
    <body>
    	<div class="corpo"> klhjafdkf gfajklghajkl gjklh sakjh kajh jkghjkahgkjahg kjaghkjhgjkagh jkahgj khsagjkh  aghjk afh gjkha gjkhafjkg hjgj gajk gjkh fsjk hjksagjk gfjkh gfag
    	</div>
    </body>
    </html>

  3. #3
    css
    codice:
    body {
    background-color: #97C236;
    text-align: center;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    padding-right: 10px;
    }
    .corpo {
    width: 850px;
    background-color: #FFFFFF;
    padding-top: 2px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    }
    .menu {
    border-top: 2px #383484 solid;
    }
    html
    codice:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title></title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
    
    <div class="corpo">
    <div class="menu">
    testo
    </div>
    </div>
    
    </body>
    </html>
    A 800x600 il padding-right su FF non va.

  4. #4
    Si è vero ma perché il div.corpo diventa più grande del body, quindi deborda. Prova a dargli un bordo al body e vedi come si comporta. Anche su Opera fa così, è su IE che si comporta male.

  5. #5

  6. #6
    codice:
    body {
    background-color: #97C236;
    text-align: center;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    }
    .corpo {
    border-right: 10px #97C236 solid;
    width: 850px;
    background-color: #FFFFFF;
    padding-top: 2px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    }
    .menu {
    border-top: 2px #383484 solid;
    }
    Così va

  7. #7
    Se al posto del div.corpo che ha una misura di 850px, quindi superiore al body nella risoluzione 800x600, metti del testo vedrai il margine lo prende. Oppure assegna al div.corpo una misura del 100% e vedrai che funziona.

  8. #8

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.