0

我无法将我的内容保存在一个圆圈的 div 中。html 会跳出其容器并尝试将自身与其中的图像对齐。关于如何将它保存在那里的任何想法?我正在使用谷歌浏览器。

先感谢您!

很高兴知道我可以来这里向我最亲密的 500 位在线朋友寻求帮助。

<div class="wrapper">
<div class="logo">
    <div style="padding-top: 3%;">
        <p class="RST" data-height="50" style="line-height: 90%;">welcome</p>
        <p  class="RST" data-height="50" style="font-weight: bold; line-height: 90%">manager</p>
    </div>
</div>

    <div class="square teal" style="width: 50%; height: 27.5%; float:left;">
        <img src="img/dollar.png"/>
        <p class="RST" data-height="20";>rent<br>managment</p>
    </div>

    <div class="square lightGreen" style="width: 50%; height: 27.5%; float:right;">
        <img src="img/tenant.png"/>
        <p class="RST" data-height="20";>tenant<br>managment</p>
    </div>


    <div class="square lightGreen" style="width: 50%; height: 27.5%; float:left;">
        <img src="img/wrench.png"/>
        <p class="RST" data-height="20";>manage<br>managment</p>
    </div>

    <div class="square teal" style="width: 50%; height: 27.5%; float:right;">
        <img src="img/pages.png"/>
        <p class="RST" data-height="20";>contract<br>managment</p>
    </div>

<div class="circle">
    <p>center<br>picture</p>
</div>

*{
    margin: 0px;
    padding: 0px;
}

#mainWrapper{
    background-image: url('../img/wheat.jpg');
    background-size: 100%;
    background-repeat: no-repeat;
    font-family: 'Didact Gothic', sans-serif;
    letter-spacing: 2px;
    width: 100%;
    height: 100%;
}

.wrapper{
    position: absolute;
    left: 32%;
    right: 32%;
    top: 5%;
    bottom: 10%;
    text-align: center;
    height: 466.2px;
}

.logo{
    width: 100%;
    height: 25%;
    color: #4a9682;
}

.logo img{
    height: 95%;
}

.logoP{
    line-height: .8;
}

.generalBox{
    width: 100%;
    color: rgba(255,255,255,0.5);
    outline: 0px solid transparent;
    vertical-align:middle;
    padding-top: 4%;
    padding-bottom: 2%;
}

.generalBox img{
    height: 75%;
    opacity: 0.5;
}

.generalBox p{
    display: inline;
    position: relative;
    bottom: 15%;
    left: 1%;
}

.square{
    color: rgba(255,255,255,0.5);
    outline: 0px solid transparent;
    vertical-align:middle;
    padding-top: 4%;
    padding-bottom: 2%;
}

.square img{
    height: 60%;
    opacity: 0.5;
}

.circle{
    background-image: url('../img/nial.png');
    width: 20%;
    height: 22.5%;
    border-radius: 100%;
    position: relative;
    top:23%;
    left: 40%;
    border-style: solid;
    border-width: 5px;
    border-color:rgba(255, 255, 255,0.9);
    background-size: 100%;
    background-repeat: no-repeat;
}

.circle p{
    font-size: 10px;
    display: inline-block;       
}

/****************************************
 Colors
*****************************************/
.teal{background-color:rgba(82,131,158,0.9);}
.purple{background-color:rgba(113,141,197,0.9);}
.lightBlue{background-color:rgba(140,220,239,0.9);}
.darkGreen{background-color:rgba(109,179,175,0.9);}
.lightGreen{background-color:rgba(76,201,182,0.9);}
.

.signUp{
    width: 100%;
    height: 10%;

}
4

1 回答 1

2

添加/更改以下属性值。

.circle{
 display: table;
}

.circle p{
    display: table-cell;
    vertical-align: middle;
}
于 2013-08-24T22:31:51.113 回答