代码之家  ›  专栏  ›  技术社区  ›  Stradigos

这个CSS布局有什么问题?

  •  4
  • Stradigos  · 技术社区  · 14 年前

    在过去的两天里,我一直在努力让它发挥作用,但收效甚微。也许我对所有嵌套的div都感到困惑,谁知道呢,但我可以使用某人来查看代码并指出正确的方向。

    我所拥有的: http://landgraff.com/backend/process.html

    它应该是什么样子的: http://landgraff.com/process.html

    我重做这个站点的原因是因为我在原始站点上使用了表,并且我试图避免使用表…所以我要重做练习=]

    以下来源: http://landgraff.com/backend/css/ProcessStylesheet.css

    @charset "utf-8";
    
    #bodytext {
        color: #6B6351;
        font-family: arial, Arial, Helvetica, sans-serif;
        font-size: 11px;
        line-height: 14pt;
        margin: 35px 0px 0px 30px;
        width: 370px;
    }
    
    #logo {
        float: left;
        background: url(../images/logosmall.gif) no-repeat;
        width: 75px;
        height: 152px;
        text-indent: -9999px;
    }
    
    #process_title {
        clear: both;
        float: left;
        background: url(../images/process/process_title.gif) no-repeat;
        width: 75px;
        height: 347px;
        text-indent: -9999px;   
    }
    
    #header {
        float: left;
        background: url(../images/process/header.gif) no-repeat;
        width: 163px;
        height: 26px;
        text-indent: -9999px;
        margin-top: 1px;
    }
    
    1 回复  |  直到 14 年前
        1
  •  1
  •   Claudiu    14 年前
    #bodytext {
    color:#6B6351;
    font-family:arial,Arial,Helvetica,sans-serif;
    font-size:11px;
    line-height:14pt;
    margin:35px 0 0 80px;
    width:395px;
    }
    
    #header {
    background:url("../images/process/header.gif") no-repeat scroll 0 0 transparent;
    height:26px;
    margin-left:100px;
    margin-top:159px;
    text-indent:-9999px;
    width:163px;
    }
    

    如果您想保留标记和类/ID,这是一种方法。此外,您还必须在副本的最后一行添加一个标记。

    对初学者来说这很好,坚强,好运!