-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
62 lines (55 loc) · 1.23 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image and Text Layout</title>
<style>
/* styles.css */
body, html {
margin: 0;
padding: 0;
height: 100%;
}
.container {
display: flex;
height: 100%;
}
.image {
flex: 2; /* Takes up 2/3 of the available width */
display: flex;
align-items: center;
justify-content: center;
background: #f0f0f0; /* Background color or image for the image side */
}
.image img {
max-width: 100%; /* Ensure the image doesn't exceed its container */
max-height: 100%;
height: auto;
}
.text {
flex: 1; /* Takes up 1/3 of the available width */
padding: 20px;
background: #fff; /* Background color for the text side */
}
.text h1 {
font-size: 24px;
margin: 0;
}
.text p {
font-size: 16px;
}
</style>
</head>
<body>
<div class="container">
<div class="image">
<img src="your-image.jpg" alt="Image">
</div>
<div class="text">
<h1>Title</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae turpis purus.</p>
</div>
</div>
</body>
</html>