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
111 changes: 109 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,111 @@
body {
background-color: #dadada;
font-size: 10px;
background-color: darkgrey;
font-size: 26px;
margin: auto;
width: 100%;
overflow: hidden;
box-sizing: border-box;
}
.container {
display: block;
width: 100%;
position: relative;
}
div {

}

.preview-baku {
width: 100%;
height: 300px;
position: relative;
background-image: url('../images/baku.jpg');
background-size: cover;
display: inline-block;
}
.preview-london {
width: 100%;
height: 300px;

position: relative;
background-image: url('../images/london.png');
background-size: cover;
display: inline-block;
}
.preview-madrid {
width: 100%;
height: 300px;
padding-top: 0;
position: relative;
background-image: url('../images/madrid.jpg');
background-size: cover;
display: inline-block;
}
.preview-rome {
width: 100%;
height: 300px;
padding-top:0;
position: relative;
background-image: url('../images/rome.jpg');
background-size: cover;
display: inline-block;
}
h1 {
font-variant: small-caps;
font-family: sans-serif;
text-align: center;
padding: 40px;
}
h2 {
position: absolute;
font-size: .75em;
top: 40px;
left: 40px;
}
@media all and (min-width: 575px) {
.preview-baku {
width: 49%;
height: 200px;
}
.preview-madrid {
width: 49%;
height: 200px;
}
.preview-london {
width: 49%;
height: 200px;
}
.preview-rome {
width: 49%;
height: 200px;
}
body {
padding-left: 100px;
padding-right: 100px;
overflow: hidden;
box-sizing: border-box;
}
}
@media all and (min-width: 991px) {
.preview-baku {
width: 24%;
height: 150px;
}
.preview-madrid {
width: 24%;
height: 150px;
}
.preview-london {
width: 24%;
height: 150px;
}
.preview-rome {
width: 24%;
height: 150px;
}
body {
padding-left: 200px;
padding-right: 200px;
overflow: hidden;
box-sizing: border-box;
}
19 changes: 10 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta name= "viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>css exercise four</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<h1>modern luxury travel</h1>
<section class="container">
<h1>Modern luxury <span class="emphasis">travel</span></h1>
<div class="preview baku">
<h1>Baku</h1>
<div class="preview-baku">
<h2>Baku</h2>
</div>
<div class="preview london">
<h1>London</h1>
<div class="preview-london">
<h2>London</h2>
</div>
<div class="preview madrid">
<h1>Madrid</h1>
<div class="preview-madrid">
<h2>Madrid</h2>
</div>
<div class="preview rome">
<h1>Rome</h1>
<div class="preview-rome">
<h2>Rome</h2>
</div>
</section>
</body>
Expand Down