I could think of how to put background image without using html as a container. Then @abraund posted his solution and I took the inspiration from his summary of the solution.
Rohit Deshpande
@rohitd99All comments
- @bene-volentSubmitted over 1 year ago@rohitd99Posted over 1 year ago
Hi Benevolent
Congrats on completing the challenge.
I'd like to suggest a few changes to your solution,
- For the attribution
footer
would be better suited thanaside
,aside
is generally used for indirectly related content andfooter
is used at the end for information about author, links, contact details etc. - I also find there is no heading in your page, each page should generally contain a
h1
for the title, so I think the name of the person can be ah1
instead ofp
for the title. - The image of the the person is not a decorative image so it should include a
alt
attribute to describe it for assistive technologies or when it fails to load there must be something to describe the image.
Hope it helps
1 - For the attribution
- @kudos2ShefSubmitted over 1 year ago
Hi, My second challenge so far. Curious to know how to write efficient HTML/CSS code. Feedback are welcome!
@rohitd99Posted over 1 year agoHi kudos2Shef
Congrats on completing the challenge.
I noticed that to center the card you've used properties like
position : relative
etc on your card, well to center something you don't need these but simply use a flex or grid onmain
main { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-around; align-items: center; }
add these to your solution and remove the
position : relative
andtop : 120px
from your card. Also I see you've used headings in the wrong way. The card title must he ah1
instead of anh3
. Each page must have a singleh1
heading for the title. Headings must be in order fromh1
throughh6
. Same for the footer instead ofh6
, I think semantically ap
element should suffice as I don't think that is a heading.Hope it helps
Marked as helpful0 - @UtkarshrajmishraSubmitted over 1 year ago@rohitd99Posted over 1 year ago
Hi Utkarsh
Congrats on completing the challenge.
Enjoyed going through it, well structured, and responsive. But I have a few suggestions that will help you improve it.
- You've used
div
's for structuring but I'd suggest usingmain
andsection
as they are semantic elements. - For representing the deleted text use
del
instead ofp
. - The spelling of Perfume is mistaken as Prefume.
- Also instead of having two images and changing them through media queries, I'd like to suggest using
picture
element with two differentsource
's. Here's the MDN doc for the same picture.
Hope it helps
1 - You've used
- @David23-DevSubmitted over 1 year ago
My English is bad sorry, this is my first challenge and I just started learning html and css
@rohitd99Posted over 1 year agoHi David
Congrats on completing your first challenge 🥳🎉.
Also no need to apologise for your english. Now coming to the challenge I have some suggestions for you.
I see you've implemented the solution nicely for the mobile and desktop sizes but for tablet size they don't cover the entire width.
@media screen and (max-width: 600px) { body{ justify-content : start; } .contenedor { box-shadow: none; flex-direction: column; height: auto; /* width: auto; */ width: 100%; justify-content: start; /* align-items: center; */ } #tusResultados { border-top-left-radius: 0; border-top-right-radius: 0; width: auto; } #summarry { width: auto; } }
I believe these properties should make it better on tablet sizes.
Other than that I also see you've used headings in a wrong way,
h1
heading must only be used once per page. All the headings must be in order that ish1
thenh2
and so on. Here's a video for correct usage of headings.Overall you've done well for your first solution, used semantic elements. Keep going and you'll learn things in no time.
1 - @JanvampiersselSubmitted over 1 year ago
Ran into some sizing issues that took me way too long to solve, but at last....
@rohitd99Posted over 1 year agoHi Jan van Ierssel
Congrats on completing the challenge.
I just wanted to point out a few things, which can improve the solution.
- I noticed you've used
h3
for the title, but anh1
heading would be more suited. For each page a singleh1
heading is always expected and all the headings must be in order fromh1
throughh6
.h1
generally goes for the title,h2
for subtitle and so on. - Also on you've put
height: 100vh
on body , main butmin-height : 100vh
should be used if you want them to stretch as per content. Although on this challenge it wouldn't make much difference.
Hope it helps
Marked as helpful2 - I noticed you've used
- @alghaylanSubmitted over 1 year ago@rohitd99Posted over 1 year ago
Hi abd nour
Just a small suggestion, I saw that you've used a
h3
heading for the title , instead use anh1
heading. Each page must have a singleh1
and all the other headings must be in order that is fromh1
throughh6
. They carry meaning and<h1>
defines the most important heading, and<h6>
defines the least important heading. Thush1
should be the most suited for the title.Hope it helped
Marked as helpful0 - @wolfgunbloodSubmitted over 1 year ago
Any comments regarding this challenge ??
@rohitd99Posted over 1 year agoHi wolfgunblood
Congrats on completing the challenge.
Really cool solution, Firstly I see you've used
h2
for the title I'd recommend usingh1
instead and styling it as required. There must always be a singleh1
heading on a page and all headings must be in order that is fromh1
toh6
. Secondly I'd suggest using semantic elements likemain
,article
,section
instead of just plain olddiv
s. Overall a very neat and clean solution.Hope it helps
Marked as helpful0 - @RohitPatra-2002Submitted over 1 year ago@rohitd99Posted over 1 year ago
Hello Rohit, from Rohit 😁
Congrats for completing the challenge.
I have but a few suggestions for you.
- You have used
article
as semantic element correctly so I'd recommend usingmain
too instead of thediv class="container"
since the card is the main content of this page. - Secondly I see you've used
div
for the background image I'd say you can usebackground-image
property on your body for the same, since those images don't have any meaning this should be better. Here's a video from Kevin Powell that shows you how to use multiple images as background.Video
Hope it helps
0 - You have used
- @YUVASRI06Submitted over 1 year ago@rohitd99Posted over 1 year ago
Hi YUVASRI06
Congrats on completing the challenge.
I'd like to suggest a few changes for improving your solution.
- You've used a
h3
element for the title I'd suggest usingh1
since each page must have a singleh1
heading and all headings must be in order fromh1
throughh6
. - Instead of simply using a
div
to wrap your content , you can use semantic elements likemain
,section
as per need. - Add
min-height : 100vh
instead of justheight: 100vh
since that blocks the content from expanding if height is larger than 100vh , although on this challenge it is certainly not an issue but on challenges which expand more than the screen size it can be one. - Also for your image you can have
width: 100%
instead of a fixed width. - Use
max-width
on your container so that it can lower beyond a certain size. - I also noticed a single
p
tag which might have been placed mistakenly so you might want to remove that too.
Hope it helps
Marked as helpful0 - You've used a
- @saeedahmedasadSubmitted over 1 year ago@rohitd99Posted over 1 year ago
Hi Saeed Ahmed
Congrats on completing the challenge 🥳.
I see that you've used your headings in an incorrect way. Generally headings are used from
h1
throughh6
and each page must only have a singleh1
for the title. So I would suggest you theh1
for the "Your Result", andh2
for the "Great" and "Summary". Secondly you've used theheight: 100vh
on your body and the main in media query, I would suggest usingmin-height : 100vh
so that the minimum height is 100vh and it can expand further as per content.Hope it helps.
1 - @Ragu-The-DeveloperSubmitted over 1 year ago
Hey There I Have Completed This Project But Backgrounds And Other stuffs like profile merge in background along with footer contents were little messy.
@rohitd99Posted over 1 year agoHi Ragu-The-Developer
Congrats on completing the challenge 🎉.
I've found that you have used multiple
h1
mainly for the name, and in the footer. Generally for each page there must only be a singleh1
heading and the headings must always be in order fromh1
throughh6
in order. I would suggest usingh1
for the name but for the footer-itemsp
element should suffice. Secondly you've used theb
element , I'm not sure if it is deprecated but I think that you can addfont-weight
in the style and use ap
element instead. Also if you want the image to stay on top of the top-background of the container as in the challenge you can add the following properties:.profile { position: relative; bottom: 50px; display: flex; justify-content: center; border-radius: 50%; border: 5px solid white; margin-left: 35%; }
Hope it helps
0 - @AshwinKumar0Submitted over 1 year ago@rohitd99Posted over 1 year ago
Hi @mRkOoL
Congrats on completing the challenge 🎉.
I have a few suggestions which might help you. You can use the following properties on your body to keep the container centered:
min-height: 100vh; display : flex; justify-content: center; align-items: center;
The min-height: 100vh makes sure the height is atleast 100vh and can expand further if the content allows. Also remove the margins on the container for it to be exactly centered. In your media query for the container you can have the following properties as on tablet sizes I noticed the content was overflowing the screen.
media screen and (min-width: 500px) .Container { flex-direction: row; max-width: 700px; width: 100%; /* min-width: 600px; */ height: 350px; /* margin-top: 100px; */ }
You also don't have an
h1
, generally each page must have a singleh1
for the title of the page. Although I agree there isn't any text to signify a title you can create a title which is only visible for screen readers. You can have a classsr-only
which hides the text visually but not from screen readers and also keeps theh1
in the page for SEO reasons..sr-only { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
Hope it helps.
Marked as helpful0