Design comparison
Solution retrospective
Is there a way to align all buttons to be at the same vertical position? The paragraphs contain a different amount of words, when resizing the browser, this causes some alignment issues with the buttons. Any tips or advice is appreciated!
Community feedback
- @Bayoumi-devPosted over 2 years ago
Hey Tamar, It looks good!...
My suggestion:
- Using more than one
<h1>
is allowed by the HTML specification, but is not considered a best practice. Using only one<h1>
is beneficial for screenreader users.
---> Multiple
<h1>
elements on one pageHope this help!... Keep coding👍
Marked as helpful0@ttaammaarrPosted over 2 years ago@Bayoumi-dev Hi Ahmed,
Thank you so much for the feedback, I will definitely use this in future projects!
If you don't mind, I do have a question. In this case, where all headings are of the same importance, would you use an h1 for the 'Sedans' section and h2 for the 'suvs' and 'luxury'. Or would you use h2 for all 3 of them? I guess the problem then would be that there's no h1 at all..
Thank you for your help!
-Tamar
0 - Using more than one
- @Akhlak-Hossain-JimPosted over 2 years ago
Nice work. For that you can do:
- set a fixed bottom padding,
- take a div with
display: flex;
forp
and thebutton
and - make
flex-direction: column; justify-content: space-between;
or
- in
section
adddisplay: flex; flex-direction: column;
, - select
img
and addwidth:64px;height:auto;
- in
button
addmargin-top:auto;
and it should always stay in the same position.
Happy coding :)
Marked as helpful0@ttaammaarrPosted over 2 years ago@Akhlak-Hossain-Jim Hi Akhlak,
Thank you so much for the suggestions! Option 2 worked like a charm on my local device, though not on GitHub pages, I'll definitely look into that further, but you helped me greatly. Thank you!
-Tamar
[edit] Scratch that, it does work! just took some time to load the new page :)
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord