当前位置: 动力学知识库 > 问答 > 编程问答 >

html - How to add a minimum margin-top?

问题描述:

i would like to have a sort of minimum margin-top. Basically if you visit my webpage

NerdyFuture. And scale the browser window down, the carousel will get smaller that's why the last news header and box need to go up. But at some point I want it to stop going up, so that the box doesn't overlap the carousel. How can i do this? Is there some kind of hack for this?

Latest News Header:

#latest_news_header{

z-index:3;

position:relative;

float:left;

width:100%;

min-width: 613px;

max-width:45%;

display:inline;

margin-top:23.5%;

font-size: 1.0em;

text-align:left;

background-color:#828282;

margin-left:18.6%;

font-weight:400;

padding:3px;

font-family: Proxima-Nova,Helvetica,Arial,sans-serif;

text-transform:uppercase;

color:#30DB00;

text-shadow: 1px 1px 3px #333;

Latest News Box:

.latest_news_box{

z-index:2;

position:relative;

display:inline;

float:left;

width:100%;

margin-left:18.6%;

min-width: 619px;

max-width:44.9vw;

height:600px;

background-color:white;

}

网友答案:

In Header_CSS.css line 35 you have :

#header {
width: 100%;
z-index: 10;
background-color: #828282;
max-height: 46px;
max-width: 100%;
}

remove the

max-height: 46px;

and give your #latest_news_header a margin-top of something like 10px, or whatever you feel is right.

分享给朋友:
您可能感兴趣的文章:
随机阅读: