Design comparison
Solution retrospective
I want to know more about the best practice for DOM manipulation, more specifically, the appending of HTML elements created using JS. I am used to create an element with javascript and change the innerHTML of that element. After that, I append it to the body or other element within the body. Howevet, I directly changed the innerHTML of the element DIreclty in this small project because it is on a small scale.
Community feedback
- @Muhammad-adam778Posted almost 2 years ago
- عاش يا بطل .احنا عرب اه لكن هستأذنك أتكلم انجليزي عشان الكلام بيدخل في بعضه هنا ومش هتفهم مني حاجه
- There is some tips to improve design & solve accessibility problems:
- First About Accessibility : In Html file delete role attribute from
<main>
and<footer>
elements, you don't need it. - Second About Design:
- You need to hide the scrollbar & center the footer horizontally, to do that check this steps:
- To hide scrollbar :
- Set the margin of
<body>
tozero
- Set the position property of
<footer>
toabsolute
and the bottom property tozero
.
- To center the footer horizontally, check code below:
footer { left: 50%; transform: translateX(-50%); }
-
For mobile : Add
text-align: center
to the<footer>
-
I hope you find that helpful.
Marked as helpful1@ahmedd-osamaPosted almost 2 years ago@Muhammad-adam778 Thanks for the tips, they are helpful indeed. Are you from Egypt BTW?
1@Muhammad-adam778Posted almost 2 years ago@ahmedd-osama Yes, i'm from Egypt, and i am so glad it was helpful.
0
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