• CSS > insérer du texte dans la bordure d’un élément

      L’astuce réside le fait de mettre un background ainsi qu’un width dans la balise h1:

       

      div{
          height:100px;
          width:100px;
          border:2px solid #333;
      }
      
      h1{
          width:30px;
          margin-top:-10px;
          margin-left:5px;
          background:white;
      }

 

Aucun commentaire

 

Laissez un commentaire