-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: master
Are you sure you want to change the base?
Conversation
<div class="box"> | ||
<img src="./images/asus.jpg" alt="Asus Laptop Image"> | ||
<p class="title"> | ||
Asus <br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not use <br>
for layout reasons - use display: block elements instead.
E.g: <span>
Asus </span>
|
||
.title { | ||
background-color: rgba(128, 128, 128, 0.7); | ||
position: relative; |
There was a problem hiding this comment.
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.
|
||
img { | ||
width: 100%; | ||
height: inherit; |
There was a problem hiding this comment.
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".
No description provided.