Home > Web Front-end > HTML Tutorial > margin :0px auto invalid_html/css_WEB-ITnose

margin :0px auto invalid_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:59:16
Original
1338 people have browsed it


.WfBottom{width:1200;background:#F9F9F9;border-top:1px solid #E9E9E9;margin-top:25px; margin:0px auto;}
.Wfbotmain{width:1200px;margin:0 auto;color:#666666;font-size:12px;padding-top:20px;background:#F9F9F9;}
.Wfbotmain ul{ float:left;  line-height:180%;padding:0 10px 25px 25px;height:110px;}
.Wfbotmain ul a,#foot_text a{color:#666666;}
.Wfbotli{border-right:1px dashed #ddd;}
.WfbotliSpan{padding:0 0 13px 15px;display:inline-block;}
.color99{padding-left:3px;}
   
         
         
         @ADDS_Lan.S_ADDS_Footer_CustomerServices
        

  • @ADDS_Lan.S_ADDS_Footer_UserJY

  •               
                
                @ADDS_Lan.S_ADDS_Footer_Follow
                
  • @ADDS_Lan.S_ADDS_Footer_MicroletterAttention

  •                 
  • @ADDS_Lan.S_ADDS_Footer_Platform

  •                 
  • @ADDS_Lan.S_ADDS_Footer_Business

  •               
                @ADDS_Lan.S_ADDS_Footer_AdvertisingSer
                
  • @ADDS_Lan.S_ADDS_Footer_Pricesystem      

  •                 
  • @ADDS_Lan.S_ADDS_Footer_Advertising

  •                 
  • @ADDS_Lan.S_ADDS_Footer_Servicesguarantee

  •                 
  • @ADDS_Lan.S_ADDS_Footer_Contact

  •                
                 
                @ADDS_Lan.S_ADDS_Footer_UseTheHelp
                
  • @ADDS_Lan.S_ADDS_Footer_RegistrationandLogin

  •                 
  • @ADDS_Lan.S_ADDS_Footer_Retrieval
  •  
                    
  • @ADDS_Lan.S_ADDS_Footer_DownloadandView

  •             
                @ADDS_Lan.S_ADDS_Footer_Contact
                
  • .@ADDS_Lan.S_ADDS_Footer_Emailservice@botudata.com.cn

  •                 
  • .@ADDS_Lan.S_ADDS_Footer_TelPhone 0731-8411-8472

  •                 
  •      8:30-11:30,13:30-17:30(@ADDS_Lan.S_ADDS_Footer_WorkDay)

  •             
                
      @ADDS_Lan.BI_AS_Language
                  
    • English
    •  
                      
    • Chinese

    •             


    现在是这个效果.:


    回复讨论(解决方案)

    容器应该是body . 是放body里面 .

    margin-top:25px 和 ui里的float:left 都去掉了,也不行.    变成这个样子.


    margin-top:25px; margin:0px auto;}
    你设了margin-top:25px 会覆盖后面的margin

    margin-top:25px; margin:0px auto;}
    你设了margin-top:25px 会覆盖后面的margin

     去掉了也不行 .

    不知道你问的是什么,如果是2个div的话,那么margin已经生效了,居中了。
    如果你是想让ul居中的话,那么跟你父级div的margin有什么关系呢?
    而且你用float:left的话就是靠左的,如果想看起来居中的话,你试试在
    Wfbotmain里面加个padding-left:100px呢。准确的需要你大概计算一下。

    不是margin:0px auto;无效,是你的Wfbotmain这个div太长了,里面的ul太靠左边,所以效果偏左

    Related labels:
    source:php.cn
    Previous article:Bootstrap 3之美06-Page Header、Breadcrumbs、Dropdowns、Button Dropdowns、用Button和Dropdowns模拟Select、Input Groups、Thumbnails、Panels、Wells_html/css_WEB-ITnose Next article:SRM 630 DIV2_html/css_WEB-ITnose
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Latest Articles by Author
    Latest Issues
    Related Topics
    More>
    Popular Recommendations
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template