Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions css/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ table {
border-collapse: collapse;
border-spacing: 0;
}

75 changes: 74 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,77 @@
*, *:before, *:after {
box-sizing: border-box;
}

body {
background-color: #d9d9d9;
font-family: serif;
font-size: 14px;
}

.header {
background-color: #d9d9d9;
color: #000000;
padding: 15px;
font-family: sans-serif;
text-align: center;
text-transform: uppercase;
}

.container {
margin: 0 auto;
padding: 0px;
width: 100%;
background-color: #dadada;
font-size: 10px;
text-align: left;
display: inline-block;
}

.location-img {
height: 300px;
width: 100%;
object-fit: cover;
}

.location {
color: #000000;
font-size: 1.5em;
padding: 30px;
position: absolute;
top: 0;
}

.preview-baku, .preview-london, .preview-madrid, .preview-rome{
margin:0px auto;
padding-bottom: 6px;
float:left;
position: relative;
}

@media screen and (min-width: 575px) {
.container {
padding: 0px 30px;
}
.preview-baku, .preview-london, .preview-madrid, .preview-rome {
width:50%;
padding: 6px 6px;
}
.location-img {
height: 300px;
}
}

@media screen and (min-width: 991px) {
.container {
padding: 0px 50px;
}
.preview-baku, .preview-london, .preview-madrid, .preview-rome {
width:25%;
padding: 0px 6px;
}
.location-img {
height: 200px;
}
.location {
padding: 15px;
}
}
23 changes: 14 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>css exercise four</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<section class="container">
<h1>Modern luxury <span class="emphasis">travel</span></h1>
<div class="preview baku">
<h1>Baku</h1>
<div class="header"><h1>Modern luxury travel</h1></div>
<div class="preview-baku">
<img class="location-img" src="images/baku.jpg" alt="Baku">
<h1 class="location">Baku</h1>
</div>
<div class="preview london">
<h1>London</h1>
<div class="preview-london">
<img class="location-img" src="images/london.png" alt="London">
<h1 class="location">London</h1>
</div>
<div class="preview madrid">
<h1>Madrid</h1>
<div class="preview-madrid">
<img class="location-img" src="images/madrid.jpg" alt="Madrid">
<h1 class="location">Madrid</h1>
</div>
<div class="preview rome">
<h1>Rome</h1>
<div class="preview-rome">
<img class="location-img" src="images/rome.jpg" alt="Rome">
<h1 class="location">Rome</h1>
</div>
</section>
</body>
Expand Down