Как я могу покрыть весь контейнер сепаратора? - PullRequest
0 голосов
/ 13 января 2019

Мой разделитель изображений покрывает весь контейнер разделителя в моих первых 2 html. Но это не работает на третьем. На третьем HTML есть 8 строк и в каждой строке 3 столбца. Некоторые селекторы не найдены на данном css, потому что я использую его для 4 htmls

/*----------------REMINDERS------------------*/

/*Standard rule: Styles and layout of a webpage 
should look like itself until window reaches 992px*/

/* To test responsiveness:
	> On browser: press f12 to see dev tools
	> click on the second icon to toggle responsive layout
	> set width to 992px and leave the height to blank to get the max height of current window
	(You can also choose desired device to test with. 
	Just click the dropdown beside current window width)
*/

/*Now on 991px, the design and layout should change to mobile view*/
/*Read more about "CSS Media Queries" to control styles on specific window sizes*/

/*------------------------------------------*/

/*Reset all styles of elements*/
*{
	margin: 0;
	padding: 0;
}

/*Observe this container on sections*/
.main-container {
	width: 80%; /*This will always get the 80% of the body*/
	margin: auto; /*To center element*/

}

/*Navigation*/
nav {
	font-size: 0;
	background-color: #ffdead;
	position: fixed; /*Navigation will stay on top even on scroll*/
	width: 100%;
	box-shadow: -1px -8px 9px 9px; /*Shadow under navigation, this gives illusion that this element float*/
	/*The z-index property specifies the stack order of an element.
	An element with greater stack order is always in front of an element with a lower stack order.*/
	z-index:2; /*This  will force other elements to stay on lower stack (higher numbers will do)*/
}

nav ul a li {
	/*tdisplay: inline-block;o position li horizontally 
	(if this cause problems, you may use "vertical-align: top;" so it will stay at the same vertical position )*/ 
	display: inline-block;
	/*vertical-align: top;*/
	padding: 10px;
	transition: all .5s; /*animate on hover*/
}

nav ul a li:hover {
	color: maroon;
}


nav ul a {
	font-family: Garamond;
	font-size: 20px;
	font-weight: bolder;
	color: maroon;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0;
}

li.active {
	border-bottom: 5px solid maroon;
	color: black;
}


/*Banner*/
.banner-container {
	background-image: url("../images/banner.jpg");
	background-size: cover; /*This will cover the whole container even on window resize*/
	background-repeat: no-repeat;
	background-attachment: fixed; /*To create parallax effect*/
	background-position: bottom;
	height: 370px;
}



/*Welcome*/
.welcome-container {
	font-size: 35px;
	padding-top: 70px;
	text-align: center;
}

.welcome-container h1 {
	letter-spacing: 3px; /*to adjust letter spacing*/
	border-bottom: 2px solid #ffdead;
	color: maroon;
	padding-bottom: 20px;
	font-size: 30px;
	/*Set texts to uppercase*/
	text-transform: uppercase; /*Always rely to set text-transform on styles and not directly to HTML*/ 
}

.welcome-container p {
	margin-top: 20px;
	color: maroon;
	padding: 15px;
	font-size: 18px;
}



/*Articles*/
.articles {
	font-size: 0;
	padding-top: 200px;
}

.articles h1 {
	letter-spacing: 3px;
	text-transform: uppercase;
	border-bottom: 2px solid #e59866;
	color: maroon;
	padding-bottom: 20px;
	margin-bottom: 20px;
	font-size: 30px;
	text-align: center;
}

.article-item-container {
	width: 33.33%; /*To get 1/3 of the .main-container*/
	margin-top: 20px;
	display: inline-block;
	vertical-align: top;
}

.article-box {
	background: #ffdead;
	border-radius: 5px;
	width: 90%; /*Get 90% width from 33.33%*/
	margin: auto;
	transition: all .325s; /*Animate on hover*/
}

.article-box:hover {
	background: #f0b27a;
	color: maroon;
}

/* ".article-content a" (child element of ".article-box") will 
change color whenever mouse hovers on ".article-box" (parent element of ".article-content a") */
.article-box:hover .article-content a { 
	color: maroon;
}

.article-title {
	font-size: 20px;
	text-transform: uppercase;
	text-align: center;
	padding-top: 20px;
	letter-spacing: 3px;
}

.article-content {
	font-size: 13px;
	text-align: center;
	padding: 20px 5px;
}

.article-content a {
	font-size: 12px;
	margin-left: 5px;
	color: gray;
	text-decoration: none;
	font-style: italic;
	transition: all .325s;
}

div.row.column.text {
    text-align: left;
    background-color: maroon;
    color: darkgray;
}

.row {
  display: flex;
  flex-wrap: wrap;
  padding: 0 4px;

}

.row .column input[type=text] {
	background-color: #212121;
	border: none;
	color: white;
	padding: 1px 5px;
	text-align: right;
    text-decoration: none;
    display: inline-block;
    font-size: 10px;
    width: 86px;
    height: 35px;
}

div input[type=button] {
	background-color: #7b241c;
	border: none;
	color: white;
	padding: 1px 5px;
	text-align: center;
	text-decoration: none;
	font-size: 1px;
	width: 85px; 
	height: 30px;
    position: relative;
}

h6 {
	text-align: left;
	text-transform: uppercase;
	font-family: Verdana;
	font-size: 10px; 
	color: maroon;

}

h5 {
	font-size: 14px;
	font-family: Garamond;
	color: black;
	text-align: auto;
	text-transform: uppercase;
}

h3 {
	padding-top: 3px;
	text-align: center;
	font-size: 15px;
	margin-left: 5px;
	color: maroon;
	text-decoration: none;
	font-family: Georgia;
}


/* Create four equal columns that sits next to each other */
.column {
  flex: 25%;
  max-width: 25%;
  padding: 0 4px;
}

.column img {
  margin-top: 8px;
  vertical-align: middle;
}

/* Responsive layout - makes a two column-layout instead of four columns */
@media screen and (max-width: 800px) {
  .column {
    flex: 50%;
    max-width: 50%;
  }
}

/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .column {
    flex: 100%;
    max-width: 100%;
  }
}

.row{
	display: flex;
	padding-top: 20px; 
}

.column {
	flex: 33.33%;
	padding: 5px;
	margin:auto;
	
}

/*Image Separator*/
.separator-container {
	margin-top: 40px;
	background-image: url("../images/background.jpg");
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed; /*Same effect on banner*/
	background-position: center;
	height: 400px;

}

/*Set dark overlay on separator*/
.overlay {
	background-color: ;
	opacity: .8; /*To adjust tranparency, this only accept values from .1 to 1*/
	width: 100%; /*Get full width of container ".separator-container" */
	height: 100%; /*Get full height of container ".separator-container" */
}

/*Contact*/
.contact-container {
	font-size: 0px;
	margin-top: 40px;
}

.contact-container h1 {
	font-size: 30px;
	text-transform: uppercase;
	color: maroon;
	letter-spacing: 3px;
}

.contact-container form {
	margin-top: 20px;
}

.contact-field {
	width: 33.33%; /*Get 1/3 of .main-container*/
	display: inline-block;
	vertical-align: top;
}

.contact-field input {
	width: 90%; /*Get 90% from 1/3 set of its container ".contact-field" */
	padding: 10px;
	border: 3px solid #ffdead;
	color: black;
	/*Try to remove this style "outline: none;" and click on the input*/
	/*You should see a color blue outline*/
	outline: none; /*use this to remove blue outline*/
	margin-bottom: 10px;
	transition: all .325s;
}

/* ":focus" executes when user clicks on an input*/
.contact-field input:focus {
	border: 3px solid #f0b27a;
	color: maroon;
}

.contact-field-full {
	width: 100%;
}

.contact-field-full input {
	float: right; /*Set to right of container ".contact-field-full"*/
	margin-right: 12px; /*Adjust to align to the Message input*/
	width: 20%; /*Always get 20% of container ".contact-field-full" */
	padding: 10px;
	margin-bottom: 10px;
	outline: none;
	border: none;
	transition: all .325s;
	cursor: pointer; /*To get a hand cursor*/
    background-color: #ffdead; 	
}

.contact-field-full input:hover {
	background: #f0b27a;
	color: maroon;
}
<!DOCTYPE html>
<html>
	<head>
		<title>Shawn Mendes	</title>
		<!-- Call external CSS file -->
		<link rel="stylesheet" type="text/css" href="css/blog.css">
        <link rel="stylesheet" type="text/css" href="css/style-media-queries.css">
		<!-- Meta tag viewport helps browser window to render webpages for mobile devices -->
			
		<meta name="viewport" content="width=device-width, initial-scale=1.0">

	</head>
	<body>
		<nav>
			<ul>
				<!-- Always put title on anchor tags and don't leave blank hrefs -->

				<a href="index.html" title="Home">
					<li>Home</li>
				</a>
				<a href="about.html" title="Music">
					<li>Music</li>
				</a>
				<a href="blog.html" title="Tour">
					<li class="active">Tour</li>
				</a>

				<a href="register.html" title="Video">
					<li>Video</li>
				</a>
			</ul>
		</nav>

		<section class="banner-container">
			
		</section>

		<div class="main-container">
			<section class="welcome-container">
				<h1>ON TOUR</h1>
			</section>

			<div class="row">
				<div class="column">
				<input type="text" name="MAR 7" value="MAR 7">
			</div>
				<div class="column">
					<div class="caption">
						<h6>Ziggo Dome</h6>
						<h5>NIEUW-AMSTERDAM, NETHERLANDS</h5>
					</div>
				</div>
				<div class="column">
					<input type="button" name="RSVP" value="RSVP">
					<input type="button" name="VIP" value="VIP">
					<input type="button" name="TICKETS" value="TICKETS">
				</div>
			</div>

			<div class="row">
				<div class="column">
				<input type="text" name="MAR 8" value="MAR 8">
			</div>
				<div class="column">
					<div class="caption">
						<h6>Ziggo Dome</h6>
						<h5>NIEUW-AMSTERDAM, NETHERLANDS</h5>
					</div>
				</div>
				<div class="column">
					<input type="button" name="RSVP" value="RSVP">
					<input type="button" name="VIP" value="VIP">
					<input type="button" name="TICKETS" value="TICKETS">
				</div>
			</div>

			<div class="row">
				<div class="column">
				<input type="text" name="MAR 10" value="MAR 10">
			</div>
				<div class="column">
					<div class="caption">
						<h6>ANTWERPS SPORTPALEIS</h6>
						<h5>ANTWERP, BELGIUM</h5>
					</div>
				</div>
				<div class="column">
					<input type="button" name="RSVP" value="RSVP">
					<input type="button" name="VIP" value="VIP">
					<input type="button" name="TICKETS" value="TICKETS">
				</div>
			</div>

			<div class="row">
				<div class="column">
				<input type="text" name="MAR 11" value="MAR 11">
			</div>
				<div class="column">
					<div class="caption">
						<h6>MERCEDES-BENZ ARENA</h6>
						<h5>BERLIN-FRIEDRICHSHAIN, GERMANY</h5>
					</div>
				</div>
				<div class="column">
					<input type="button" name="RSVP" value="RSVP">
					<input type="button" name="VIP" value="VIP">
					<input type="button" name="TICKETS" value="TICKETS">
				</div>
			</div>
   
			<div class="row">
				<div class="column">
				<input type="text" name="MAR 13" value="MAR 13">
			</div>
				<div class="column">
					<div class="caption">
						<h6>OSLO SPEKTRUM ARENA</h6>
						<h5>OSLO, NORWAY</h5>
					</div>
				</div>
				<div class="column">
					<input type="button" name="RSVP" value="RSVP">
					<input type="button" name="VIP" value="VIP">
					<input type="button" name="TICKETS" value="TICKETS">
				</div>
			</div>

			<div class="row">
				<div class="column">
				<input type="text" name="MAR 15" value="MAR 15">
			</div>
				<div class="column">
					<div class="caption">
						<h6>ERICSSON GLOBE</h6>
						<h5>STOCKHOLM, SWEDEN</h5>
					</div>
				</div>
				<div class="column">
					<input type="button" name="RSVP" value="RSVP">
					<input type="button" name="VIP" value="VIP">
					<input type="button" name="TICKETS" value="TICKETS">
				</div>
			</div>

			<div class="row">
				<div class="column">
				<input type="text" name="MAR 16" value="MAR 16">
			</div>
				<div class="column">
					<div class="caption">
						<h6>ROYAL ARENA</h6>
						<h5>COPENHAGEN, DENMARK</h5>
					</div>
				</div>
				<div class="column">
					<input type="button" name="RSVP" value="RSVP">
					<input type="button" name="VIP" value="VIP">
					<input type="button" name="TICKETS" value="TICKETS">
				</div>
			</div>

			<div class="row">
				<div class="column">
				<input type="text" name="MAR 18" value="MAR 18">
			</div>
				<div class="column">
					<div class="caption">
						<h6>LANXESS ARENA</h6>
						<h5>KOLN,GERMANY</h5>
					</div>
				</div>
				<div class="column">
					<input type="button" name="RSVP" value="RSVP">
					<input type="button" name="VIP" value="VIP">
					<input type="button" name="TICKETS" value="TICKETS">
				</div>
			</div>
		


		<section class="separator-container">
			<div class="overlay"></div>
		</section>

		<div class="main-container">
			<section class="contact-container">
				<h1>Get Updates</h1>
				<form method="GET" action="#">
					<div class="contact-field">
						<input type="text" name="full-name" placeholder="Email Address" required/>
					</div>
					<div class="contact-field">
						<input type="text" name="email-address" placeholder="Postal Code" required/>
					</div>
					<div class="contact-field">
						<input type="text" name="message" placeholder="Country" required/>
					</div>
					<div class="contact-field-full">
						<input type="submit" name="submit" value="Submit"/>
					</div>

				</form>
				<h3>By submitting this form, you agree to our privacy policy </h3> 
                            <h3> Disclaimer: The owner of this website does not own any of its images and contents. Credits to the rigtful owner. </h3>
			</section>
		</div>
	</body>
</html>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...