Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entrega - Week1 - day0 #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
86 changes: 86 additions & 0 deletions src/week1/day0/css/gallery.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/* Small screens (default) */
html {
font-size: 100%;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}

/* Medium screens (640px) */
@media (min-width: 40rem) {
html { font-size: 112%; }
}

/* Large screens (1024px) */
@media (min-width: 64rem) {
html { font-size: 120%; }
}

@media (max-width: 350px) {
.container > h1 {
font-size: 3rem;
}
}

*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

.container {
margin: 0 auto;
max-width: 48rem;
width: 90%;
}

.wrapper {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}

h1 {
text-align: center;
font-weight: bolder;
font-size: 4rem;
}

.box {
height: 15rem;
width: 15rem;
margin: 10px auto 10px auto;
border: #000000 2px solid;
}

img {
width: 100%;
height: inherit;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Be careful using "inherit" value. Remember that inherits this property from its parent element.
  • Use "height: auto".

padding: 5px;
}

.title {
background-color: rgba(128, 128, 128, 0.7);
position: relative;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Remember to use "position: relative" in your "container or parent" element. E.g: <div class="box">. After that, you will have to set "position: absolute" in your child element, in this case <div class="title">. It will be better.

left:0;
top:-102.5%;
margin:0;
width: 100%;
height: 35%;
opacity: 0;
transition: all 0.6s ease-in-out;
}

.box:hover > .title {
opacity: 1;
}

p {
font-size: 2rem;
font-weight: bold;
color: #FFFFFF;
text-align: center;
}

p > span {
font-size: 1rem;
font-weight: 100;
}
Loading