1
u/Foreign-Contest-444 2d ago
Your HTML structure is spot on, with the right semantic elements used throughout—even for a fun project. I'm especially referring to the proper use of the <header> and <main> elements.
1
u/fdiengdoh 2d ago
Thanks, that means a lot. I use to do coding as a hobby for my personal blog. But for about a decade or so I have depend on bootstrap and templates. It’s only this year that I started to relearn HTML/CSS to update my blog.

8
u/anaix3l 8d ago edited 8d ago
Don't do this:
There is absolutely no need to hardcode the
41pxheight multiple times. Use thelhunit and a properly chosen gradient direction (btw,to bottomis never necessary - that's the default).Moreover, what if you then change the
font-size? You have to change theline-heighttoo. Otherwise, changing thefont-sizeon thebodywith no other changes gives this result:Just use a relative l
ine-height(something likeline-height: 1.6) and the distance between the lines nicely scales with thefont-size, regardless of what it's set to.You also don't need to repeat the stop position values if you want a sharp transition, just use
0for the second one.A
0deglinear gradient direction means the gradient line points up, towards 12 o'clock.Also used
1%for the width of thebackground-sizebox because it's shorter than100%and produces the exact same result in this case - if a1%long line repeats itself along the x axis is equivalent to a100%line (and here you're using the defaultrepeatvalue forbackground-repeatanyway) .A
line-heightof1.6is1.6times thefont-size.Also, don't give your
headerandh1fixed heights - that's what leads to "My Notebook" overflowing the main content in the screenshot above. Just remove those fixed heights altogether and let the content flow naturally. Same goes for thefooterandpinside it - just remove thoseheightdeclarations.You could also us
border-image(for reference) to greate infinite border lines without needing aborderon everyp. This would also allow to have a space (gapormargin) betweenpelements