English 中文(简体)
理解相对和绝对定位:如何使内部四分五裂与集装箱底线一致
原标题:Understanding relative and absolute positioning: how to align an internal div to the bottom of the container

仍在学习如何编织和编织。 我有:

<div id="Fascione">
</div>
<div id="Wrapper">
    <div id="Menu">
    </div>
    <div id="Contenuto">
        <div id="Liturgia">
        </div>
        <div id="Container">
            <div id="Ristorante">
            </div>
            <div id="Insieme">
            </div>
            <div id="Progetto">
            </div>
        </div>
        <div id="Unitre">
        </div>
    </div>
</div>
<div id="Footer">
</div>

and css looks like:

html, body{width:100%;height:100%;}
body{width:1024px; margin:0px auto;padding:0px;border-width:0px;}
div#Fascione{width:inherit;height:125px;border-bottom:2px solid black;}
div#Wrapper{width:inherit;padding:8px 0px 8px 0px;/*background-color:#647;*/}
    div#Menu{float:left;width:200px;/*background-color:#F41;*/}
    div#Contenuto{margin-left:208px;/*background-color:#9bb;*/}
         div#Liturgia{float:left;width:34%;margin-bottom:1%;background-color:#987;}
         div#Container{float:left;width:65%;margin-bottom:1%;margin-left:1%;background-color:#aaaaaa;}
            div#Ristorante{float:left;width:49%;margin-bottom:1%;margin-left:1%;background-color:#123;}
            div#Insieme{float:left;width:49%;margin-bottom:1%;margin-left:1%;background-color:#abc;}
            div#Progetto{float:left;border-top:1px solid gray;background-color:#369;}
     div#Unitre{clear:left;border-top:1px solid gray;background-color:#de7;}
div#Footer{clear:left;width:inherit;height:40px;border-top:2px solid black;/*background-color:#1a9;*/} /* clear left needed! */

我想做的是,将“Progetto”与“Unitre”上岸边界连接起来。

我在阅读其他职位时试图将“Container”定在职位上:relative和“Progetto”职位上:absolute;bottom:0px;但这不是我所需要的。

Can anyone help me?

问题回答

设置具有相对地位的集装箱不是一种良好做法。 你们应该做的是,把两个小块的边缘 zero为零,只把边界加到必要的一边,例如:

    Proggetto{
//no bottom border;
border:1px 1px 0 1px;
border-color:black;
margin:0;
}
Unitre{
border:1px solid black
margin:0;
}




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签