Aligning the text inside a <ul> list - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Text

Description

Aligning the text inside a <ul> list

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">
.profilePicture {<!-- w ww  .  j a va  2 s  .c o m-->
   width:201px;
   height:201px;
   border:2px solid Chartreuse;
   margin:6px;
}

.UploadPicture ul li a {
   text-decoration:none;
   margin-left:11px;
   padding-left:31px;
   padding-right:31px;
}

.UploadPicture ul li {
   list-style-type:none;
   margin:11px;
   vertical-align:middle;
   display:block;
   background:yellow;
   text-align:center;
}

.UploadPicture ul li:hover {
   background:blue;
}

.UploadPicture ul {
   display:table-row;
}
</style> 
 </head> 
 <body> 
  <div class="UploadPicture"> 
   <ul> 
    <li> <a href="#">Change Profile Picture</a> </li> 
    <li> <a href="#">Privacy</a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials