将相同的填充百分比赋予不可行的div



我有一个网站的体系结构,我想将相同的填充百分比设置为两个div(a和b),但他们没有共享父母和兄弟姐妹这样做?


row
|-col-md-3
|   |-div A
|
|-col-md-9
    |-row
       |-col-md-1
           |-div B

我试图将height: 100%给他们每个父母的Divs,以便它允许Div A和Div B具有相同的高度,但最终填充%总是不同的,我是否缺少某些东西?

在@cbroe评论后,将一点点挖掘到视口单元中plunker在评论中说明这是什么意思。

.custom-padding {
  padding-top: 8vh; // This can be applied to every part of your website in which you want to set a padding, ignoring heights and widths compared to percentages and pixels
}

最新更新