开发者

vertical alignment of html list

开发者 https://www.devze.com 2023-03-06 00:51 出处:网络
I have a list as <ul class=\"List\"> <li>large amount of text</li> <li>large amount of text</li>

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


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

精彩评论

暂无评论...
验证码 换一张
取 消