« first day (3436 days earlier)      last day (352 days later) » 

9:18 AM
a perfect duplicate: stackoverflow.com/q/73632418/8620333 reopened by non-CSS people ... The OP is claiming they don't want to use float but the target is not about float (stackoverflow.com/q/73365812/8620333). There is a solution that uses float because it's actually the only possible solution. Without float it's not possible but maybe someone will come with a non-float solution one day
 
 
4 hours later…
1:26 PM
@PaikuHan if a teacher tells you to use/not use certain properties, you should do what they ask because they're grading you based on what they want to see. However, in real life there is not an authoritative 'best practices' guide anywhere for HTML and CSS... there are 1 million guides that claim to be the best practices, and they all differ slightly.
All that matters is you follow the spec. IDs are fine to use in CSS selectors, for example, but your teacher is probably concerned (or has read an article discussing this concern) about the higher specificity of IDs and the fact that an ID means you are targeting one specific element rather than groups of elements
likewise, I'm not sure what she's talking about with height vs padding; they do different things and are not really interchangeable. If you need an image to be 200px tall, padding ain't gonna do diddly squat for you
@PaikuHan As far as reliable guides, aside from the spec by W3C (NOT w3schools; the two are not affiliated in any way and I personally recommend against w3schools, though they aren't as bad as they used to be these days), I would recommend MDN
Also blogs like CSS Tricks and Alistapart have good articles all the time
CSS Zen Garden has a good collection of sites showing off what you can do with CSS, though those sites aren't necessarily following best practices... they're more pushing the boundaries of what's possisble
@TemaniAfif I will take a closer look in a bit but at first glance they don't seem to be duplicates; the Q is using flexbox, not grid layout like the target, and asks specifically if it's possible to do it without floats, so how to do it with floats is not an answer/duplicate.
Remember that "this is not possible" is a valid answer on Stack Overflow.
also wow that's quite the diatribe by that OP in the comment section there
 
1:51 PM
@TylerH The target is not using Grid layout. The OP is simply thinking that grid is the solution but also open to flexbox or any other technique. Also float is "one" solution to the problem, not the only solution as the duplicate may contain another one. Actually float seems to be the best one but that doesn't exclude any other solution that can be added to the target. Even if the OP don't want float, the target still apply because any other solutions should be added there.
 
 
1 hour later…
3:17 PM
 
 
3 hours later…
6:19 PM
@TemaniAfif Had a chance to look at the answers on the target and look more closely. I edited the target question title just a tad to make it more clear what OP is asking there and to make it more clear how it applies to the question that is closed, and I re-closed the first question as a dupe of it
 
👍
 

« first day (3436 days earlier)      last day (352 days later) »