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
2 changes: 2 additions & 0 deletions css-exercise-four-master/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# css-exercise-four
Exercise focused on the usage of media queries
48 changes: 48 additions & 0 deletions css-exercise-four-master/css/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
109 changes: 109 additions & 0 deletions css-exercise-four-master/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
*, *:before, *:after {
box-sizing: border-box;
}

body {
background-color: #dadada;
margin: auto;
font-size: 10px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

section {
display: inline-block;
/* align-items: center; */
background-position: center;
/* align-items: center; */
}



.modern-luxury h1 {
font-size: 2em;
font-weight: 400;
text-transform: uppercase;
padding: 25px 0 30px 0;
position: absolute;
margin: 2% 0;
/* padding: 10% 0 20% 50%; */
top: 5%;
left: 50%;
transform: translate(-50%, -50%);
}

.preview {
display: inline-flex;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
/* align-items: center; */
margin: 1% 1%;
padding: 20px 25px;
width: 25em;
height: 25em;
/* width: 200px;
height: 200px; */
}

.preview.baku {
background-image: url("../images/baku.jpg");
}

.preview.baku h1 {
font-size: 1.2em;

/* position: absolute;
top: 8px;
left: 16px */
}

.preview.london {
background-image: url("../images/london.png");
}

.preview.london h1 {
font-size: 1.2em;
/* position: absolute; */
top: 8px;
left: 8px;
}

.preview.madrid {
background-image: url("../images/madrid.jpg");
}

.preview.madrid h1 {
font-size: 1.2em;
/* position: absolute; */
top: 8px;
left: 8px;
}



.preview.rome h1 {
font-size: 1.2em;
/* position: absolute; */
top: 8px;
left: 8px;
}

.preview.rome {
background-image: url("../images/rome.jpg");
}



@media screen and (min-width: 575px){
div {
margin: 1%;
width: 48%;
}
}

@media screen and (min-width: 991px){
div {
margin: 1%;
width: 25%;
}
}
Binary file added css-exercise-four-master/images/baku.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added css-exercise-four-master/images/london.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added css-exercise-four-master/images/madrid.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added css-exercise-four-master/images/rome.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions css-exercise-four-master/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE html>
<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">

<div class="modern-luxury"><h1>Modern luxury <span class="emphasis">travel</span></h1></div>
<br>

<div class="preview baku">
<!-- <img src="images/baku.jpg" alt="Baku"> -->
<h1>Baku</h1>
</div>

<div class="preview london">
<!-- <img src="images/london.png" alt="London"> -->
<h1>London</h1>
</div>

<div class="preview madrid">
<!-- <img src="images/madrid.jpg" alt="Madrid"> -->
<h1>Madrid</h1>
</div>

<div class="preview rome">
<!-- <img src="images/rome.jpg" alt="Rome"> -->
<h1>Rome</h1>
</div>

</section>
</body>
</html>
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,38 @@
<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">
<img src="images/baku.jpg" alt="Baku">
<h1>Baku</h1>
</div>

<div class="preview london">
<img src="images/london.png" alt="London">
<h1>London</h1>
</div>

<div class="preview madrid">
<img src="images/madrid.jpg" alt="Madrid">
<h1>Madrid</h1>
</div>

<div class="preview rome">
<img src="images/rome.jpg" alt="Rome">
<h1>Rome</h1>
</div>

</section>
</body>
</html>
48 changes: 48 additions & 0 deletions reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
49 changes: 49 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
*, *:before, *:after {
box-sizing: border-box;
}

body {
background-color: #dadada;
margin: auto;
font-size: 10px;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

div {
/* object-fit: contain; */
float: left;
margin: 1% 0;
/* width: 20em;
height: 20em; */
padding: 20px 25px;

}

img {
display: flex;
object-fit: contain;
width: 25em;
height: 25em;
}

@media screen and (min-width: 575px){
div {
margin: 1%;
width: 48%;
}
}

@media screen and (min-width: 991px){
div {
margin: 1%;
width: 25%;
}
}

/* h1 .title {
font-size: 4em;
text-align: center;
} */
/* h1 div {
font-size: 2.5em;
} */