Jump to content
  • 0

Помогите разобраться с версткой


kudryavi
 Share

Question

<div class="container">
		<div class="relation">
			<div class="relation__ratio">
				<div class="relation__wrapper">					
					<div class="relation__big-img">
						<img src="img/gallery3.png" alt="gallery3">
					</div>
					<div class="relation__row relation__row1">
						<img class="relation__img" src="img/gallery1.png" alt="gallery1">
						<img class="relation__img" src="img/gallery2.png" alt="gallery2">
					</div>			
					<div class="relation__row">
						<img class="relation__img" src="img/gallery4.png" alt="gallery4">
						<img class="relation__img" src="img/gallery5.png" alt="gallery5">
					</div>					
				</div>
			</div>
		</div>
	</div>
img {
	max-width: 100%;
}

.container {
	max-width: 1290px;
}

.relation {
	position: relative;
}

.relation__ratio {
	height: 0;
	padding-top: 64.1%;
}

.relation__wrapper {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;

	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	border: 1px solid red;
}

.relation__big-img {
	width: 40%;
	flex: 1 1 100%;
	display: flex;
	flex-direction: column;
}

.relation__row {
	width: 30%;
	display: flex;
	flex-direction: column;
	flex: 1 1 100%;
}

.relation__row1 {
	order: -1;
}

.relation__img {
	flex: 1 1 50%;
}

@media screen and (max-width: 992px) {
	.relation__ratio {
		padding-top: 103.9%;
	}

	.relation__big-img {
		width: 70%;
	}

	.relation__row {
		flex-basis: 50%;
	}

	.relation__row1 {
		order: 1;
	}
}

Помогите пожалуйста разобраться, что делаю не так.

2.jpg

1.png

Edited by kudryavi
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy