简体   繁体   English

自适应设计有效,但无法水平对齐

[英]Responsive Design is working, but not aligning horizontally

I made this wholse website by myself to learn better and understand what i am doing. 我自己创建了这个全面的网站,以更好地学习和了解我在做什么。 However the boxes (Box1,Box2 etc) are not aligning in right. 但是,框(Box1,Box2等)未正确对齐。 I want that all headlines are on the same hight, can someone point me out? 我希望所有头条新闻都在同一高度,有人可以指出我吗?

http://hasaanlatif.de/ http://hasaanlatif.de/

CSS: http://hasaanlatif.de/main.css CSS: http//hasaanlatif.de/main.css

使用position position:relative ,然后使用css的topbottom属性,并使用-ve或+ ve值调整为相同的高度

Try this: 尝试这个:

.box {
    color: black;
    margin: 2% 0 2% 0%;
    padding: 0;
    border: 0px solid black;
    width: 33.33%;
    display: inline-block;
    float: left;
}

Change your width if want add more box 如果要添加更多框,请更改宽度

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM