Vertical align p in span in button - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button layout

Description

Vertical align p in span in button

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">

button {<!--from   www  .j  a v a 2s . c  o  m-->
   width: 100%;
   padding: 0;
   border: 0;
   background-color: green;
   position: relative;
}
.content {
   display: inline-block;
   padding: 1em;
}
.container {
   width: 100%;
   line-height:60px;
   background-color: blue;
   position: absolute;
   top: 0;
   left: 0;
   display: block;
}
.container p {
   background: yellow;
}


      </style> 
 </head> 
 <body> 
  <button type="submit" id="button" name="send-message"> <span class="content">Lorem ipsum</span> <span class="container"> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr</p> </span> </button>  
 </body>
</html>

Related Tutorials