[CSS3] DRY, li display:inline to avoid float

Refactor the paragraph properties to use shorthand syntax.
p {
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 10px;
  margin-left: 0;
  font-family: tahoma, arial, sans-serif;
  font-size: 14px;
  line-height: 16px;
}
p {
  margin: 0 0 10px 0;
  font: 14px/16px tahoma, arial, sans-serif;
}

 

Using display function avoid DRY:

I used float: left; For that I need to add group class....

A simple way is to add display: inline;

 

水平/垂直居中:text-align: center; margin: 0 auto;

 

posted @ 2014-08-11 04:19  Zhentiw  阅读(174)  评论(0)    收藏  举报