RISOLTO Didascalia (hyperlink) sotto tre immagini in linea. (HTML e CSS)

Stato
Discussione chiusa ad ulteriori risposte.

FrancescoZoino0

Nuovo Utente
10
2
Salve a tutti, mi trovo parecchio in difficoltà con una pagina che non riesco a completare.

Ho tre immagini in linea (due righe), vorrei che sotto ogni immagine ci sia un testo collegato all'attributo "href" dell'immagine stessa. E vorrei che il testo sia centrato all'immagine e soprattutto che esse rimangano nella stessa posizione, o simile.

Lascio il codice, qualcuno può aiutarmi? grazie.

HTML:
<!DOCTYPE html>
<html>
    <head>
        <!-- Responsive -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- Icons with FontAwesome 5 -->
        <script src="CENSURATO" crossorigin="anonymous"></script>
        <!-- CSS Code -->
        <style>
        html, body, header{
            padding: 0px;
            margin: 0px;
            background-color: #fefefb;
        }
        
          
        </style>
        <!-- Google Fonts -->
        <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap" rel="stylesheet">
        <!-- Title -->
        <title>Piattaforma Servizi - CENSURATO</title>
    </head>
    <header>
        <center>
    <img src="CENSURATO" width="250" style="margin-top: 10px;">
    </center>
    </header>
    <body>
       <center><div style="margin-top: 20px;"><font style="font-family: 'Roboto', sans-serif; font-size: 25px;">Benvenuto nella Piattaforma Servizi CENSURATO!</font></div></center>
       <!-- Container with options. -->
       <center>
       <div id="container" style="margin-top: 30px;">
       <a href="#"><img src="/includes/img/1.png"></a><a href="#"><img src="/includes/img/2.png"></a><a href="#"><img src="/includes/img/3.png"></a><br /><a href="#"><img src="/includes/img/4.png"></a><a href="#"><img src="/includes/img/5.png"></a><a href="#"><img src="/includes/img/6.png"></a>
       </div>
       </center>
  </body>
  <footer>
      <center>
      <small><font style="font-family: 'Roboto', sans-serif; font-size: 15px;">&copy; Copyright <?php echo date("Y"); ?> CENSURATO</font></small>
      </center>
  </footer>
</html>
 

Moffetta88

Moderatore
Staff Forum
Utente Èlite
20,394
12,848
CPU
i5-4690
Dissipatore
DEEPCOOL CAPTAIN 240EX
Scheda Madre
MSI Z97 U3 PLUS
HDD
KINGSTON SSD KC400 240GB
RAM
24GB BALLISTIX SPORT @2133MHz
GPU
STRIX GTX980 DC2OC
Audio
INTEGRATA
Monitor
AOC G2590VXQ
PSU
BEQUIET! System Power 7 500W
Case
DEEPCOOL MATREXX 55
Periferiche
NESSUNA
Net
EOLO 100
OS
UBUNTU/WINDOWS11
center ?
small ?
font ?
css in-line?
ma che è? un portale del 1992?
I tag center e font occhio che non sono supportati in HTML5!
Vuoi fare una cosa del genere??
 
  • Mi piace
Reazioni: FrancescoZoino0

Moffetta88

Moderatore
Staff Forum
Utente Èlite
20,394
12,848
CPU
i5-4690
Dissipatore
DEEPCOOL CAPTAIN 240EX
Scheda Madre
MSI Z97 U3 PLUS
HDD
KINGSTON SSD KC400 240GB
RAM
24GB BALLISTIX SPORT @2133MHz
GPU
STRIX GTX980 DC2OC
Audio
INTEGRATA
Monitor
AOC G2590VXQ
PSU
BEQUIET! System Power 7 500W
Case
DEEPCOOL MATREXX 55
Periferiche
NESSUNA
Net
EOLO 100
OS
UBUNTU/WINDOWS11
Ok, allora il codice te l'ho già messo lì :)
Per completezza te lo metto pure qui sotto. Ma diciamo che avresti bisogno di un corso accelerato di html/css, perchè da quello che ho visto è un pastrocchio :(
HTML:
<a href="#">
    <img src="https://duncanlock.net/images/posts/better-figures-images-plugin-for-pelican/dummy-200x200.png" />
    <span>TESTO 1</span>
</a>

<a href="#">
    <img src="https://duncanlock.net/images/posts/better-figures-images-plugin-for-pelican/dummy-200x200.png" />
    <span>TESTO 2</span>
</a>

<a href="#">
    <img src="https://duncanlock.net/images/posts/better-figures-images-plugin-for-pelican/dummy-200x200.png" />
    <span>TESTO 3</span>
</a>

CSS:
a {
    position: relative;
    display: inline-block;
}

a span {
   display: block;
   text-align: center;
    width: 100%;
    height: 2em;
    color: #000;
    background-color: rgba(0,0,0,0.5);
}
 

Moffetta88

Moderatore
Staff Forum
Utente Èlite
20,394
12,848
CPU
i5-4690
Dissipatore
DEEPCOOL CAPTAIN 240EX
Scheda Madre
MSI Z97 U3 PLUS
HDD
KINGSTON SSD KC400 240GB
RAM
24GB BALLISTIX SPORT @2133MHz
GPU
STRIX GTX980 DC2OC
Audio
INTEGRATA
Monitor
AOC G2590VXQ
PSU
BEQUIET! System Power 7 500W
Case
DEEPCOOL MATREXX 55
Periferiche
NESSUNA
Net
EOLO 100
OS
UBUNTU/WINDOWS11
Ottimo, cambia il titolo con [RISOLTO]
Buona continuazione :)
 
Stato
Discussione chiusa ad ulteriori risposte.

Entra

oppure Accedi utilizzando
Discord Ufficiale Entra ora!

Discussioni Simili