Почему контакты ушли вниз и имя, емэйл, отзыв стоят в строчку?

0

Уже скопировал с исходного все, ни чего не поменялось. Контакты возле футера, под ним в строчку имя, почта, отзыв.

html
css

10 ответов

0

У меня норм все со всеми страницами и в Google Chrome и в Firefox.

Если бы вы показали ваш код, может быть смог бы что-то вам подсказать, а пока только могу предположить, что вы допустили где-то ошибку в вашем коде или в css-стилях или неправильно подключили ваши стили.

0
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="description" content="Киномонстр - это портал о кино" />
<meta name="keywords" content="фильмы, фильмы онлайн, hd" />
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
<div class="main">

<div class="header">
<div class="logo">
<div class="logo_text">
<h1><a href="/">Киномонстр</a></h1>
<h2>Кино - наша страсть!</h2>
</div>
</div>
<div class="menubar">

<ul class="menu">
<li class="selected"><a href="#">Главная</a></li>
<li><a href="#">Фильмы</a></li>
<li><a href="#">Сериалы</a></li>
<li><a href="#">Рейтинг фильмов</a></li>
<li><a href="#">Контакты</a></li>
</ul>

</div>
</div>

<div class="site_content">

<div class="sidebar_container">

<div class="sidebar">
<h2>Поиск</h2>
<form method="post" action="#" id="search_form" >
<input type="search" name="search_field" placeholder="ваш запрос" />
<input type="submit" class="btn" value="найти" />
</form>
</div>

<div class="sidebar">
<h2>Вход</h2>
<form method="post" action="#" id="login">
<input type="text" name="login_field" placeholder="логин" />
<input type="password" name="password_field" placeholder="пароль" />
<input type="submit" class="btn" value="вход" />
<div class="lables_passreg_text">
<span><a href="#">забыли пароль?</a></span> | <span><a href="#">регистрация</a></span>
</div>

</form>
</div>

<div class="sidebar">
<h2>Новости</h2>
<span>31.01.2018</span>
<p>мы запустили расширенный поиск</p>
<a href="#">читать</a>

</div>

<div class="sidebar">
<h2>Рейтинг фильмов</h2>
<ul>
<li><a href="#">Интерстеллар</a><span class="rating_sidebar">8.1</span></li>
<li><a href="#">Матрица</a><span class="rating_sidebar">8.0</span></li>
<li><a href="#">Безумный Макс</a><span class="rating_sidebar">7.5</span></li>
<li><a href="#">Облачный атлас</a><span class="rating_sidebar">7.4</span></li>
</ul>

</div>

</div>
</div>

</div>

</div>

<h1>Контакты</h1>
<hr>
<p>Отправьте ваш отзыв о портале КиноМонстр</p>

<div class="send send_contact">
<form method="post" action="#" id="contact">
<input type="text" name="review_name" placeholder="ваше имя">
<input type="text" name="review_email" placeholder="ваш email">
<textarea name="review_text"></textarea>
<input class="btn" type="submit" value="отправить">
</form>
</div>


<div class="footer">
<p>
<a href="#">Главная</a> |
<a href="#">Фильмы</a> |
<a href="#">Сериалы</a> |
<a href="#">Рейтинг фильмов</a> |
<a href="#">Контакты</a> |
</p>
<p>wh-db.com 2015</p>

</div>

</div>
0
.send_contact input[type="text"] {
width: 500px;
}

.send_contact textarea {
width: 516px;
}
0

Где тут может быть ошибка?

0

CSS

* {
margin: 0;
padding: 0;
}

body {
font-size: 1.2em;
background-color: #fff;
color: #555;
}

p {
padding: 0 0 20px 0;
line-height: 1.7em
}

input[type="text"], input[type="password"], input[type="search"] {
color: #5d5d5d;
width: 60%;
padding: 8px;
}
input, textarea {
outline: none;
border: none;
border: solid 1px #f2f2f2;
}
h1, h2 {
font: normal 170% 'century gothic', arial;
margin: 0 0 15px 0;
padding: 15px 0 5px 0;
color: #000;
}

h2 {
font-size: 140%;
}

a, a:hover {
outline: none;
text-decoration: underline;
color: #aeb002;
}
ul {
margin: 2px 0 22px 17px;
}

ul li {
margin: 0 0 6px 0;
padding: 0 0 4px 5px;
line-height: 1.5em
}


.header {
background-color: darkslateblue;
height: 177px;
font-size: 0.8em;
margin-left: 0px;
margin-right: 0px;
min-width: 900px;
}

.main, .logo, .menubar, .site_content, .footer {
margin-left: auto;
margin-right: auto;
}

.logo {
width: 880px;
padding-bottom: 40px;
}
.logo h1, .logo h2 {
font: normal 300% "century gothic", arial, sans-serif;
margin: 0 0 0 9px;
}
.logo_text h1, .logo_text h1 a, .logo_text h1 a:hover {
padding: 22px 0 0 0;
color: #fff;
letter-spacing: 0.1em;
text-decoration: none;
}
.logo_text h2 {
font-size: 0.9em;
padding: 4px 0 0 0;
color: #999;
}

.menubar {
width: 900px;
height: 46px;
}

ul.menu {
float: right;
}
ul.menu li {
float: left;
padding: 0 0 0 9px;
list-style: none;
margin: 1px 2px 0 0;
}

ul.menu li a {
font: normal 100% 'trebuchet ms', sans-serif;
display: block;
height: 20px;
padding: 6px 35px 5px 28px;
color: #fff;
text-decoration: none;
}

ul.menu li.selected a {
color: #aeb002;
}

ul.menu li a:hover {
color: #e4ec04;
}

hr {
border: solid 1px #f3f3f3;
}

.site_content {
width: 880px;
overflow: hidden;
margin: 20px auto 0 auto;
background-color: wite;
}

.sidebar_container {
float: right;
width: 224px;
}

.sidebar {
float: right;
width: 222px;
padding: 5%;
margin: 0 0 16px 0;
border: solid 1px #f2f2f2;
border-radius: 5px;
background-color: #f9f9f9;
}
.btn {
padding: 8px;
background-color: white;
cursor: pointer;
}

.sidebar h2 {
color: #136cb2;
}
.lables_passreg_text{
font-size: 0.7em;
margin-top: 3%;
margin-left: 2%;
}

.sidebar ul {
margin: 0;
}
.sidebar ul li {
list-style-type: none;
margin: 0 0 0 0;
}

.sidebar .rating_sidebar {
float: right;
}

.content {
text-align: left;
width: 620px;
padding: 0 0 0 5px;
float: left;
}

.content a {
text-decoration: none;
}

.films_blog {
margin-bottom: 5%;
}

.films_blog img {
border-radius: 5px;
border: solid 5px #dad7d5;
width: 22%;
}

.posts .posts_content {
font-size: 0.8em;
}

.info_film_page {
margin-top: 2%;
margin-bottom: 4%;
}

.info_film_page .label {
font-size: 1.2em;
}

.info_film_page .value{
font-size: 1em;
color: #49945a;
margin-right: 3%;
}

.description_film {
margin-bottom: 15%;
}

.description_film img {
float: left;
margin-right: 2%;
border-radius: 5px;
border: solid 5px #dad7b5;
}

.reviews {
margin-bottom: 4%;
font-size: 0.9em;
}

.reviews .reviews_name {
background-color: #7268ad;
color: white;
padding: 1%
}

.reviews .reviews_text {
padding-top: 2%;
padding-bottom: 2%;
padding-left: 2%;

}

.send {
margin-bottom: 4%;
}

.send input[type="text"], textarea {
border: solid 1px #c3c3c3;
margin-bottom: 2px;
}

.send input[type="text"] {
width: 98%;
}

.send textarea {
width: 624px;
height: 200px;
}

.send input[type="submit"] {
background-color: #7268ad;
padding: 3%;
color: white;
border-radius: 5px;
}

.send_contact input[type="text"] {
width: 500px;
}

.send_contact textarea {
width: 516px;
}

.footer {
width: 100%;
height: 100%;
padding: 28px 0 5px 0;
text-align: center;
background-color: darkslateblue;
color: #a8aa94;
margin-left: 0px;
margin-right: 0px;
min-width: 900px;
}

.footer a {
color: #a8aa94;
text-decoration: none;
}
.footer a:hover {
color: #fff;
text-decoration: : none;
}
.footer p {
padding: 0 0 10px 0;
0

Всем спасибо, получилось у самого! Только кнопка отправить сбоку?

0

Тоже нормально сайт выглядит. 

0

1. У вас перед div с классом header не хватает div с классом main. header должен входить в div main.

2. Проверьте вложенность html-тегов, с вложенностью явно что-то не так, вроде последний div лишним получается. 

Смотрите здесь пример (в ответе) и в этот шаблон встраивайте код контактов:

https://fructcode.com/ru/courses/html-and-css/footer-interactive/

Или исходник кода скачивайте готовый из последнего урока (справа сверху вкладка Файлы) и там смотрите пример, если не получится самостоятельно встроить.

0

Такая страница контактов должна быть:

HTML

<div class="main">
		
		<div class="header">
			<div class="logo">
				<div class="logo_text">
					<h1><a href="index.html">КиноМонстр</a></h1>
					<h2>Кино - наша страсть!</h2>
				</div>
			</div>
			
			<div class="menubar">
				
				<ul class="menu">
					<li><a href="index.html">Главная</a></li>	
					<li><a href="films.html">Фильмы</a></li>
					<li><a href="#">Сериалы</a></li>
					<li><a href="rating.html">Рейтинг фильмов</a></li>
					<li class="selected"><a href="contact.html">Контакты</a></li>
				</ul>

			</div>

		</div>

			
		<div class="site_content">
			
			<div class="sidebar_container">
				
				<div class="sidebar">
					<h2>Поиск</h2>
					<form method="post" action="#" id="search_form" >
						<input type="search" name="search_field" placeholder="ваш запрос" />
						<input type="submit" class="btn" value="найти" />
					</form>
				</div>

				<div class="sidebar">
					<h2>Вход</h2>
					<form method="post" action="#" id="login">
						
						<input type="text" name="login_field" placeholder="логин" />
						<input type="password" name="password_field" placeholder="пароль" />
						<input type="submit" class="btn" value="вход" />
						<div class="lables_passreg_text">
							<span><a href="#">забыли пароль?</a></span> | <span><a href="#">регистрация</a></span>
						</div>

					</form>
				</div>

				<div class="sidebar">
					<h2>Новости</h2>
					<span>31.02.2018</span>
					<p>Мы запустили расширенный поиск</p>
					<a href="#">читать</a>
				</div>

				<div class="sidebar">
					<h2>Рейтинг фильмов</h2>
					<ul>
						<li><a href="show.html">Интерстеллар</a><span class="rating_sidebar">8.1</span></li>
						<li><a href="#">Матрица</a><span class="rating_sidebar">8.0</span></li>
						<li><a href="#">Безумный макс</a><span class="rating_sidebar">7.5</span></li>
						<li><a href="#">Облачный атлас</a><span class="rating_sidebar">7.4</span></li>
					</ul>
				</div>

			</div>

			<div class="content">
				
				<h1>Контакты</h1>
				<p>Отправьте ваш отзыв о портале КиноМонстр</p>
	
				<div class="send send_contact">	
					<form method="post" action="#" id="contact">
						<input type="text" name="review_name" placeholder="ваше имя">
						<input type="text" name="review_email" placeholder="ваш email">
						<textarea name="review_text"></textarea>
						<input class="btn" type="submit" value="отправить">
					</form>
				</div>


			

			</div>

		</div>





	<div class="footer">
		<p>
			<a href="index.html">Главная</a> |
			<a href="films.html">Фильмы</a> | 
			<a href="#">Сериалы</a> |
			<a href="rating.html">Рейтинг фильмов</a> |
			<a href="contact.html">Контакты</a>
		</p>
		<p>fructcode.com</p>
	</div>

	</div>

CSS

* {
  margin: 0;
  padding: 0;
}

body {
  font-size: 1.2em;
  background-color: #fff;
  color: #555;
}

p {
  padding: 0 0 20px 0;
  line-height: 1.7em;
}

input[type="text"], input[type="password"], input[type="search"] {
  color: #5d5d5d;
  width: 60%;
  padding: 8px;
} 

input, textarea {
  outline: none;
  border: none;
  border: solid 1px #f2f2f2;
}

h1, h2 {
  font: normal 170% 'century gothic', arial;
  margin: 0 0 15px 0;
  padding: 15px 0 5px 0;
  color: #000;
}

h2 {
  font-size: 140%;
}

a, a:hover {
  outline: none;
  text-decoration: underline;
  color: #aeb002;
}

ul {
  margin: 2px 0 22px 17px;
}

ul li {
  margin: 0 0 6px 0;
  padding: 0 0 4px 5px;
  line-height: 1.5em;
}


.header {
  background-color: darkslateblue;
  height: 177px;
  font-size: 0.8em;
  margin-left: 0px;
  margin-right: 0px;
  min-width: 900px;
}

.main, .logo, .menubar, .site_content, .footer {
  margin-left: auto;
  margin-right: auto;
}

.logo {
  width: 880px;
  padding-bottom: 40px;
}

.logo h1, .logo h2 {
  font: normal 300% 'century gothic', arial, sans-serif;
  margin: 0 0 0 9px;
}

.logo_text h1, .logo_text h1 a, .logo_text h1 a:hover {
  padding: 22px 0 0 0;
  color: #fff;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.logo_text h2 {
  font-size: 0.9em;
  padding: 4px 0 0 0;
  color: #999;
}

.menubar {
  width: 900px;
  height: 46px;
}

ul.menu {
  float: right;
}

ul.menu li {
  float: left;
  padding: 0 0 0 9px;
  list-style: none;
  margin: 1px 2px 0 0;
}

ul.menu li a {
  font: normal 100% 'trebuchet ms', sans-serif;
  display: block;
  height: 20px;
  padding: 6px 35px 5px 28px;
  color: #fff;
  text-decoration: none;
}

ul.menu li.selected a {
  color: #aeb002;
}

ul.menu li a:hover {
  color: #e4ec04;
}

hr {
  border: solid 1px #f3f3f3;
}

.site_content {
  width: 880px;
  overflow:hidden;
  margin: 20px auto 0 auto;
  background-color: white;
}

.sidebar_container {
  float: right;;
  width: 224px;
}

.sidebar {
  float: right;
  width: 222px;
  padding: 5%;
  margin: 0 0 16px 0;
  border: solid 1px #f2f2f2;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.btn {
  padding: 8px;
  background-color: white;
  cursor:pointer;
}

.sidebar h2 {
  color: #136cb2;
}

.lables_passreg_text {
  font-size: 0.7em;
  margin-top: 3%;
  margin-left: 2%;
}

.sidebar ul {
  margin: 0;
}

.sidebar ul li {
  list-style-type: none;
  margin: 0 0 0 0;
}

.sidebar .rating_sidebar {
  float: right;
}


.content {
  text-align: left;
  width: 620px;
  padding: 0 0 0 5px;
  float: left;
}

.content a {
  text-decoration: none;
}

.films_block {
  margin-bottom: 5%;
}

.films_block img {
  border-radius: 5px;
  border: solid 5px #dad7d5;
  width: 22%;
} 

.posts .posts_content {
  font-size: 0.8em;
}


/* Страница просмотра фильма */

.info_film_page {
  margin-top: 2%;
  margin-bottom: 4%;
}

.info_film_page .label {
  font-size: 1.2em;
}

.info_film_page .value {
  font-size: 1em;
  color: #49945A;
  margin-right: 3%;
}

.descriptions_film {
  margin-bottom: 15%;
}

.descriptions_film img{
  float:left;
  margin-right: 2%;
  border-radius: 5px;
  border: solid 5px #dad7d5;
}

.reviews {
  margin-bottom: 4%;
  font-size: 0.9em;
}

.reviews .review_name {
  background-color: #7268AD;
  color: white;
  padding: 1%;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.reviews .review_text {
  padding-top: 2%;
  padding-bottom: 2%; 
  padding-left: 2%;
}

.send {
  margin-bottom: 4%;
}

.send input[type="text"], textarea {
  border: solid 1px #C3C3C3;
  margin-bottom: 2%;
}

.send input[type="text"]{
  width: 98%;
}

.send textarea {
  width: 624px;
  height: 200px;
}

.send input[type="submit"]{
  background-color: #7268AD;
  padding: 3%;
  color: white;
  border-radius: 5px;
}



.send_contact input[type="text"] {
  width: 500px;
}

.send_contact textarea {
  width: 516px;
}



.info_film {
  margin-bottom: 5%;
  background-color: #f9f9f9;
  padding: 5%;
  height: 270px;
}

.info_film img {
  float: left;
  margin-right: 2%;
  border-radius: 5px;
  border: solid 5px #dad7d5;
  width: 25%;
}

.button {
  background-color: #7268ad;
  padding: 2%;
  color: white;
  border-radius: 5px;
  float: right;
  margin-top: 5%;
  clear: both;
  font-size: 0.8em;
}

.button a {
  color: white;
}


table {
  width: 100%;
  border: solid 1px #f4f4f4;
}

td {
  padding: 2%;
  border: solid 1px #f4f4f4;
}

td img {
  width: 60px;
  vertical-align: middle;
}

.center {
  text-align: center;
}

.rating {
  font-weight: bold;
}

.footer {
  width: 100%;
  height: 100px;
  padding: 28px 0 5px 0;
  text-align: center;
  background-color: darkslateblue;
  color: #a8aa94;
  margin-left: 0px;
  margin-right: 0px;
  min-width: 900px;
}

.footer a {
  color: #a8aa94;
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
  text-decoration: none;
}

.footer p {
  padding: 0 0 10px 0;
}


/* CSS Mobile */

@media only screen
and (min-device-width : 320px)
and (max-device-width : 568px) {

  .header {
    background-color: #257965;
    min-width: 100%;
    height: 20%;
    text-align: center;
  }

  .logo {
    width: 100%;
  }

  .site_content {
    width: 100%;
  }

  .menubar {
    width: 100%;
    height: 100%;
  }

  .content {
    width: 100%;
    text-align: center;
  }

  .site_content { 
    width: 100%;
    text-align: center;
  }
  
  .sidebar_container {
    display: none;
  }

  .footer {
    display: none;
  }

  ul.menu {
    float: none;
  }

  ul.menu li {
    margin: 0;
    padding: 0;
    float: none;
  }

  .logo h1 {
    font: normal 235% 'century gothic', arial, sans-serif;
  }

  .logo h2 {
    font: normal 100% 'century gothic', arial, sans-serif;
    color:white;
  }

  .content h1, h2 {
    font: normal 110% 'century gothic', arial;
  }

  .films_block img {
    width: 43%;
  }

  .posts_content p {
    line-height: 1.5em;
    padding: 3%;
    text-align: left;
  }

  .posts p {
    font-size: 120%;
  }

  /* fimls page */
  .info_film {
    float:none;
    height: 100%;
  }

  .info_film img {
    width: 90%;
    margin-bottom: 5%;
  }

  .button {
    float: none;
  }

  /* rating page */
  table {
    display: block;
  }

  th {
    font-size: 75%;
  }

  td {
    padding: 0;
    margin: 0;
    font-size: 95%;
    text-align: left;
  }

  /* show page */
  iframe {
    width: 88%;
    height: 100%;
  }

  .descriptions_film {
    width: 90%;
    text-align: left;
    margin-left: 2%;
  }
  
  .descriptions_film img {
    float: none;
    width: 73%;
    display: block;
    margin: 0;
    padding: 0;
    margin-left: 11%;
    margin-bottom: 7%;
  }

  .reviews {
    text-align: left;
    width: 96%;
  }

  .send input[type="text"] {
    width: 80%;
  }

  .send textarea {
    width: 85%;
  }


}
0

Css код покажите полностью

Sign up or Log in to write an answer