Jump to content

How to align text in the ul li to center and by left side?

- - - - -

  • Please log in to reply
No replies to this topic

#1
Stasonix

Stasonix

    Learning Programmer

  • Members
  • PipPipPip
  • 82 posts
  • Programming Language:C++, PHP, JavaScript, Delphi/Object Pascal, Pascal
  • Learning:C++, PHP, JavaScript, Delphi/Object Pascal
Watch this, it looks like unordered position, how to set it much more in the column type, but!!! very imporant, I can't use margins or bottoms, 'caz it's breaking whole my design:


          <ul class='vnul'>

             <li class='item'><a href="#">Someing unos</a></li>

             <li class='item'><a href="#">Some dos</a></li>

             <li class='item'><a href="#">tres</a></li>

             <li class='item'><a href="#">Some quatro</a></li>

         </ul>



.vnul {

  list-style: none;

  margin: 0;

  padding: 0;

  width: 150px;

  border: 1px solid green;

  }

.vnul li {

  text-align: center;

}



Edit this Fiddle - jsFiddle - Online Editor for the Web (JavaScript, MooTools, jQuery, Prototype, YUI, Glow and Dojo, HTML, CSS)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users