Visualizzazione dei risultati da 1 a 6 su 6
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2015
    Messaggi
    67

    Bottone che si sposta con "ripristina giù"

    Ho creato una pagina iniziale con un semplice sfondo in background, un titolo di benvenuto e un bottone sotto al titolo che premuto porta alla prima pagina del sito.
    Ho notato che se rimpicciolisco la schermata del browser con "ripristina giù", il bottone si sposta. come posso ovviare a questo problema e far si che il bottone rimanga sempre sotto al titolo anche con un ridimensionamento?
    Per il bottome ho usato questo style
    codice HTML:
    <style type="text/css">#bottone {position : absolute; right: 630px; left: 630px}</style>
    Può essere che il problema sia dovuto allo style del bottone avendo i impostato i pixel specifici che deve occupare li occupa anche quando si rimpicciolisce la schermata?
    Ultima modifica di FDLx; 16-01-2015 a 14:21

  2. #2
    Posta l' intero codice

  3. #3
    Utente di HTML.it
    Registrato dal
    Jan 2015
    Messaggi
    67
    codice HTML:
    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//IT”><html><head>    
    <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1?>    <title>www.stellar.com</title>
    <style type="text/css">#bottone {position : absolute; right: 630px; left: 630px}</style>
    </head><body background="universo.jpg">
    <h1 size="7" align="center"><font face="Impact" font color="yellow" font size="7"><div align="center"><b>BENVENUTO IN STELLAR</b></font></div></h1>
    <form action=pagina1.html target="_self">  <input type="submit" id="bottone" name="bottone" value="ENTRA NEL SITO"/><embed src=stellarsound.mp3 autostart="true" hidden="true" loop="100"></embed></form>
    </body>
    <html>

  4. #4
    Per essere sicuro, metti sempre tutto in un contenitore principale, almeno l' oggetto al suo interno eredita la centratura.
    codice:
    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//IT”>
     <html>
      <head>    
       <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1?> 
       <title>www.stellar.com</title>
       <style type="text/css">
        .main { text-align: center;}
       </style>
      </head>
     <body background="universo.jpg">
      <div class="main">
      <h1 size="7">
      <font face="Impact" font color="yellow" font size="7">
      <b>BENVENUTO IN STELLAR</b></font></h1>
      <form action=pagina1.html target="_self">  <input type="submit" id="bottone" name="bottone" value="ENTRA NEL SITO"/>
      <embed src=stellarsound.mp3 autostart="true" hidden="true" loop="100"></embed>
      </form>
      </div>
     </body>
    </html>

  5. #5
    Utente di HTML.it
    Registrato dal
    Jan 2015
    Messaggi
    67
    Grazie tante, il proplema è risolto! Devo stare attento a mantenere le gerarchie!

  6. #6
    Nel tuo caso potevi anche buttare gli stili e mettere tutto il contenuto in un <center>

    codice:
    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//IT”>
     <html>
      <head>    
       <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1?> 
       <title>www.stellar.com</title>
      </head>
     <body background="universo.jpg">
      <center>
      <h1 size="7">
      <font face="Impact" font color="yellow" font size="7">
      <b>BENVENUTO IN STELLAR</b></font></h1>
      <form action=pagina1.html target="_self">  <input type="submit" id="bottone" name="bottone" value="ENTRA NEL SITO"/>
      <embed src=stellarsound.mp3 autostart="true" hidden="true" loop="100"></embed>
      </form>
      </center>
     </body>
    </html>

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 © 2025 vBulletin Solutions, Inc. All rights reserved.