CodePen

HTML

            
              <ul>
    <li>asdf</li>
    <li>dfdf</li>
    <li>deef</li>
</ul>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              ul {
  position: relative;
  left: 50%;
  top: 0;
  padding: 0;
  margin: 0 auto;
  display: block;
  float: left;
  clear: right;
  list-style: none;
  background: red;
}

li {
  position: relative;
  right: 50%;
  top: 0;
  padding: 10px;
  display: block;
  float: left;    
  outline: 1px solid black;
}

body {
  padding: 20px 0 50px 0;
  background: pink;
  border: 20px solid white;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................