user1212
user1212

Reputation: 951

vertical alignment of html list

I have a list as

<ul class="List">
  <li>large amount of text</li>
  <li>large amount of text</li>
</ul>

.list{
   display:inline; 
   overflow:hidden;
 }

How can i get the list to have the same left vertical margin. What is happening now is that the text on the left is not aligned

Upvotes: 0

Views: 257

Answers (1)

breezy
breezy

Reputation: 1918

Do you have a reset stylesheet? Can you provide a screenshot?

By what you have described try the following.

Also remember when writing Markup everything is case-sensitive your List is capitalized while in the CSS it's lowercase

.list{
   display:inline; 
   overflow:hidden
 }
 .list li {
   display:block;
   margin:0 0 0 15px
   }

<ul class="list">
  <li>large amount of text</li>
  <li>large amount of text</li>
</ul>

Upvotes: 1

Related Questions