Tue, 2020-02-04 21:55
Hi, I have grouped the CSS below into 2 versions. Is one of these a preferred structure? Is one better than the other?
Thanks for any thoughts,
Del
Version 1
.pagetext, .galleryheading, .gallery-text, #sitelogo { margin-top: 10px;} .pagetext, .gallerybox, .galleryheading, .gallery-text { padding: 10px; } .gallerybox { margin-top: 5px; } #sitelogo { padding: 5px; }
Version 2
.pagetext, .galleryheading, .gallery-text { margin-top: 10px; padding: 10px;} .gallerybox { margin-top: 5px; padding: 10px; } #sitelogo { margin-top: 10px; padding: 5px; }
Tue, 2020-03-17 19:44
#1
Good question. I wonder also
Good question. I wonder also if one is better than the other.
Wed, 2020-03-18 16:00
#2
Neither qualify as good
#2 is less bad. Both indicate a lack of understanding of the cascade. I'm guessing that you're using something like Bootstrap, which is throwing so much caca at the wall that some is bound to stick.
Keep in mind that CSS doesn't mean much without your showing the html it applies to.
gary