@Alex-Archer-I
Posted
Hey there!
Cool work, it's very interesting way to make links. I've never heard about windows.location
before =)
If you don't mind, there is a couple of suggestions.
- Semantically correct to use
a
tags instead of buttons here. - Also, since it's a list, it's better to use
ul
tag here withli
inside. main
very important semantic tag and every page should contain it.- And you can reduce number of tags - for example, there is no need in
picture
here - you can styleimg
directly. That could be said aboutspan
wrapper for the links.
And a couple things about css.
- You can get rid of
border: none
of the container - it's a default value, so there is no need to specify it. - There is a bit overkill with margins =) Try to remove
margin-top: 100px;
of the name element andmargin-bottom: -88px;
of the picture and you'll see that everything align just right =) - It's better to use
rem
for font sizes. It's a special values which depend on th browser font settings.
It's totally ok, if you just want to practice something unusual, so, please take my words as hints to best practices, not criticism =)
Oh, and about JS and web pages there are plenty of possibilities =) Almost every interactive element made with JS. Like sliders, thicker, accordions and stuff. You can even make a simple game with JS right on the web page =)
So, congrats with completing challenge, you use creative approach, so keep going =)
@dkdkdkd222
Posted
@Alex-Archer-I no no, I really appreciate it! Yeah the centering of the divs were frustrating me and used the margins to align it, but I felt I was just repeating code over and over.
I saw your projects and I must say I’m very impressed. So I’m definitely taking your advice here😂
@Alex-Archer-I
Posted
@dkdkdkd222
Hey, thanks, but I'm a self-taught and definitely didn't follow best practices somewhere =)
And what about centering - you did quite right with flex. By the way, flex has a gap
property which can create, well, gaps between flex elements without margins. If you need equal spaces it's a very convenient way.