Sridhar Katakam's Weblog

Center Google Search Results

Posted on May 25, 2021 | 0 comments

I am currently using a 4K 27″ LG monitor with display resolution set to 2048 x 1152.

Google search results page seems to be annoyingly stuck in 90s with the search results floating to the left and this is especially noticeable on larger screens.

There is a Chrome extension called Center Google Search Results. While it is okay, the end result could be better.

I tweaked the CSS of the google search results using Stylus.

Before:

After:

Here’s the custom CSS:

#cnt {
    max-width: 1140px;
    margin: 0 auto;
}

.srp #searchform {
    max-width: 1140px;
    left: 50%;
    transform: translate(-50%, 0);
}

#hdtb-msb {
    float: none;
    max-width: 1140px;
}

.MUFPAc,
.WE0UJf {
    margin-left: 0;
}

#center_col {
    width: 100%;
    margin-left: 0;
}

#rcnt {
    width: 100%;    
}

.kno-kp.mnr-c.g, .g-blk.g, .KIy09e,
.g, .KIy09e,
#botstuff,
div[role="navigation"],
.ULSxyf,
#taw {
    width: 1140px;
}

.IsZvec {
    max-width: none;
}

.fbar {
    margin-left: 0;
}

.g {
    width: 1140px !important;
}

[data-hveid="CCAQAA"],
[data-hveid="CEYQAA"],
[data-hveid="CB4QAA"],
[data-hveid="CBYQAA"],
[data-hveid="CBMQAA"] {
    width: 100% !important;
}

.wsn-google-focused-link,
.XN9cAe > * {
    width: auto !important;
}

I use AdGuard, uBlock Origin etc. and do not see ads. Further tweaking may be needed if ads are visible.

Leave the first comment