The logo on the top left of the google search result page:
https://www.google.com/search?q=why+does+google+put+logos+in+tables
Screenshot:
Is there a reason for this? Optimization or obfuscation? Is Google just being hipster?
My best guess: vertical alignment:
#gbqlw {
display: table-cell;
height: 71px;
padding: 0;
padding-right: 16px;
position: relative;
vertical-align: middle;
}
While it's not impossible to align content vertically outside of a table cell, doing so within a TD is by far the easiest, particularly when you want vertical-align: middle
.
Take a look at the source, Google's main search site breaks many 'rules'. Incorrect semantic element usage, using tables for positioning, omitting unnecessary close tags, etc. whatever uses the fewest characters. They seem to take a 'whatever works' approach, HTML that would get you downvoted if you suggested it on SO for example. You could and should accomplish the same logo positioning using CSS, but consider that they have the resources to maintain it and ensure browser compliance and a lot of incentive to keep their page size as few bytes as possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With