Create vertical paragraph with transform - HTML CSS CSS Property

HTML CSS examples for CSS Property:text-transform

Description

Create vertical paragraph with transform

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

.box {<!--from  w  w w .j ava 2 s .  c o  m-->
   position: relative;
   width: 100%;
   float: left;
   border: 2px solid #444;
   min-height: 150px;
}
.box > div {
   text-align:right;
   position:absolute;
   left: 0;
   top: 0;
   padding: 0;
   margin: 0;
   background: #f00;
   color: #fff;
   width: 20px;
   min-height: 150px;
   font-size: 14px;
   font-family: arial;
   transform: rotate();
}
.box > div > p {
   transform: rotate(-90deg);
}


      </style> 
 </head> 
 <body> 
  <div class="box"> 
   <div> 
    <p> hello </p> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials