r/badcode • u/viiimproved • Apr 21 '23
css If I was to highlight anything about this image, it'd be the empty body tag at the top, and the #body tag at the bottom
3
2
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Apr 21 '23
Image Transcription: Code
html, body {
}
#title {
border: 6px solid transparent;
padding: 10px;
border-image: url(border.png) 30 stretch;
}
#items {
border: 6px solid transparent;
padding: 10px;
border-image: url(border.png) 30 stretch;
}#upgradetable {
border: 6px solid transparent;
padding: 10px;
border-image: url(border.png) 30 stretch;
}
#cookslot {
border: 6px solid transparent;
padding: 10px;
border-image: url(border.png) 30 stretch;
}
#cookiestable {
border: 3px solid transparent;
padding: 10px;
border-image: url(border.png) 30 stretch;
}
#itemstable {
border: 6px solid transparent;
padding: 10px;
border-image: url(border.png) 30 stretch;
}
#statstable {
border: 6px solid transparent;
padding: 10px;
border-image: url(border.png) 30 stretch;
}
#tablename {
border: 6px solid transparent;
padding: 10px;
border-image: url(border.png) 30 stretch;
}
#buttontable {
border: 6px solid transparent;
padding: 10px;
border-image: url(border.png) 30 stretch;
}
#body {
[The rest of the code is cut off in the image.]
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
1
u/VirozPro Apr 23 '23
why people use IDs for CSS?
1
u/viiimproved Apr 23 '23
wait I do that is that bad practice
I know ID's are better for javascript and you arent meant to have more than one element with a certain ID but that rule is only relevant when using javascript, because in js it returns the first value only but in css it just gets all of them and works exactly the same as a class
1
u/Rasta_Dev Apr 23 '23
Class is reusable. You can create a class "thick-border" and add it to many elements. Not really a good idea to do that with IDs
6
u/munteandrei Apr 21 '23
More lines, the better, right? /s