Я проектирую заголовок, и мой текст div движется вниз.DIV таинственным движением вниз
HTML:
CSS:
/*Code written by Oliver Murfett and Caelan Grgurovic 2015
Start Code*/
/*The following are classes that can be added to tags to give them certain features*/
.italics, i, em {
font-style: italic;
}
.bold, b, strong {
font-weight: bold;
}
.underline, u {
text-decoration: underline;
}
.hidden {
display: none;
}
/*Fonts*/
@font-face {
font-family: "Open Sans-Regular";
src: url(Fonts/OpenSans-Regular.ttf);
}
@font-face {
font-family: "Trajan Pro Regular";
src: url(Fonts\Trajan Pro Regular.ttf);
}
/*The following styles are to the maximize page space*/
html, body {
width: 100%;
margin: 0px;
padding: 0px;
background-color: white;
top: 0px;
height: 100%;
min-height: 100%;
}
#body-container {
width: 100%;
margin: 0px;
padding: 0px;
top: 0px;
height: 100%;
min-height: 100%;
}
header {
width: 100%;
margin: 0px;
padding: 0px;
top: 0px;
height: 100px;
}
/*The following styles are to style the header*/
#header-content {
width: 100%;
margin: 0px;
padding: 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
height: 100%;
min-height: 100%;
}
#logo-container {
height: 100%;
min-height: 100%;
display: inline-block;
margin-right: 20px;
}
#logo-container img {
height: 100%;
min-height: 100%;
}
#header-text-container {
height: 100%;
min-height: 100%;
top: 0;
display: inline-block;
margin-top: 0px;
}
#header-text-top-container {
height: 50%;
min-height: 50;
}
#header-text-bottom-container {
height: 50%;
min-height: 50;
}
#SACRED-HEART-COLLEGE {
font-family: "Trajan Pro Regular";
font-size: 34px;
color: rgb(30,30,117);
}
Весь код здесь: http://jsfiddle.net/j5kcfwLa/
Теперь для моей проблема: # заголовок-текст-контейнер DIV движется вниз, а не оставаться наверху. Я пробовал top: 0;
, который ничего не делает, и position: absolute
, что делает ненужные шансы. Как я могу заставить этот контейнер к вершине своего родителя?
почему бы вам не попробовать, как этот http://jsfiddle.net/j5kcfwLa/2/ –
@Oliver Murfett вы просто пропустили применять 'точек' или «% 'после 50 в следующем селекторе # header-text-bottom-container { \t высота: 50%; \t мин-высота: 50; } –