-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Question about exercise 10E #52
Comments
Hi! The reason it wasn't necessary to have the two vertical divs is due to the fact that you could just use margin-left on the elements rather than containers that holds the elements. Remember, a div is a container that is used to affect elements within it in a certain way. It also can be used to separate whole groups of elements from other groups. In this lesson, after styling both the icon and the subtitle, the only thing left was to create space between the two. That can easily be done with margin-left. Your method would still work except you would have to use the margin of the containers rather than the actual elements since they are inside. I guess what I'm saying is that you would have less work if you just directly affected the elements rather than put them into containers. Note: I keep mentioning margin-left because that's what I did (I applied it to the subtitle) but you could also use margin-right but apply it to the icon. |
Thanks
…On Wed, Jul 12, 2023, 10:50 AM StudioProgrammar ***@***.***> wrote:
Hi! The reason it wasn't necessary to have the two vertical divs is due to
the fact that you could just use margin-left on the elements rather than
containers that holds the elements. Remember, a div is a container that is
used to affect elements within it in a certain way. It also can be used to
separate whole groups of elements from other groups.
In this lesson, after styling both the icon and the subtitle, the only
thing left was to create space between the two. That can easily be done
with margin-left. Your method would still work except you would have to use
the margin of the containers rather than the actual elements since they are
inside.
Note: I keep mentioning margin-left because that's what I did (I applied
it to the subtitle) but you could also use margin-right but apply it to the
icon.
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3ZZBYITRVZ5H4ICAAZHD6LXPZ6RBANCNFSM6AAAAAA2GKHVBE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Ah, I understand, makes sense. Thank you! |
So, in exercise 10D the drawing looks like 4 vertical divs and 2 horizontal divs (in the third vertical one).
When I finished exercise 10E, that's the picture I was following to build the html code. After finishing I saw that in the solution, the only divs that are used are 1 for the 'whole' block with vertically everything in it, and 1 for the horizontal blocks. I'll attach a picture of what my code looked like and under it the code from the solution.
I did succeed in making it look like it was supposed to, but I totally did too much and I can't figure out why it was not needed to add all the divs?
Especially after making the divs for the youtube page, where we also used 2 divs for the 2 vertical parts.
I hope I explained it well, if not please let me know so I can clarify :-) Thanks in advance!
The text was updated successfully, but these errors were encountered: