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
103 changes: 102 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,105 @@
*, *:before, *:after {
box-sizing: border-box;
}

.container {
width: 100%;
margin: auto;
}

.preview {
margin: 0% 2% 2% 2% auto;
width: 100%;
text-align: left;
}

body {
background-color: #dadada;
font-size: 10px;
font-size: 16px;
}

h1 {
text-align: center;
font-size: 100%;
padding: 5%;
font-variant: small-caps;
font-family: sans-serif;
}

h3 {
font-size: 150%;
text-align: left;
padding: 10% 80% 80% 10%;
}

.baku {
background-color: #dadada;
background-image:url(../images/baku.jpg);
background-position: center;
background-size: cover;
text-align: left;
}

.london {
background-color: #dadada;
background-image:url(../images/london.png);
background-position: center;
background-size: cover;
}

.madrid {
background-color: #dadada;
background-image:url(../images/madrid.jpg);
background-position: left;
background-size: cover;
}

.rome {
background-color: #dadada;
background-image:url(../images/rome.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}

/* Smaller Screens */

@media screen and (min-width: 575px){
.container {
width: 80%;
}
.preview {
margin: 2% auto;
width: 50%;
float: left;
height: 200px;
padding: inherit;
}
h1 {
font-size: 100%;
}
h3 {
font-size: 100%;
}
}

/* Larger Screens */

@media screen and (min-width: 991px){
.container {
width: 70%;
}
.preview {
margin: 1%;
width: 23%;
float: left;
height: 200px;
padding: inherit;
}
h1 {
font-size: 125%;
}
h3 {
font-size: 125%;
}
}
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
<title>css exercise four</title>
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<section class="container">
<h1>Modern luxury <span class="emphasis">travel</span></h1>
<h1>modern luxury <span class="emphasis">travel</span></h1>
<div class="preview baku">
<h1>Baku</h1>
<h3>Baku</h3>
</div>
<div class="preview london">
<h1>London</h1>
<h3>London</h3>
</div>
<div class="preview madrid">
<h1>Madrid</h1>
<h3>Madrid</h3>
</div>
<div class="preview rome">
<h1>Rome</h1>
</div>
<h3>Rome</h3>
</section>
</body>
</html>