Skip to main content

Blogger Notable theme pop-up header issue fix (thanks to Gemini Pro)

I've made a few half hearted attempts over the years to to fix Blogger's Notable theme's rendering of the pop-up header that shows up when you scroll down the page a decent amount and then pull back to reveal that secondary header. On Chrome mobile I noticed a gray box that forms next to the magnifying glass icon. I never looked in detail on Chrome desktop, but it had an issue as well which I'll detail below. 

If you are looking for a solution and don't want all of the extra talk about how I was able to find it, here it is: 
.centered-top-container.sticky .main_header_elements {
    overflow: hidden !important;
}

I decided to try using Gemini Pro 2.5 to see if it was capable of finding the issue and giving me a fix. Turns out that it was able, but it took a bit of collaboration back and forth to find the actual problem. 

Here is a modified article I asked it to give me based on our debugging chat (it was very colorful in the article which I scaled back a lot, lol). I also was trying to fix this problem with ChatGPT, but didn't extend the conversation as far, so I never got to a working solution there. 

The Initial Report: A Mysterious Gray Box

The problem was a visual glitch in my blog's "sticky header". After scrolling down and then back up, a small gray rectangle would appear next to the search icon. The strangest part? It only happened on Chrome for Android.


The issue I noticed in mobile Chrome on an Android device.

Take note that DuckDuckGo mobile didn't have the issue. So it seemed like some sort of rendering quirk between browsers. 

My immediate assumption was that this had to be a CSS issue. An element in the header was somehow failing to inherit the header's black background, revealing the gray page body behind it or whatever else.

To start, I gathered the evidence: the screenshot and the full HTML theme file for my Blogger site. I presented this to Gemini Pro and asked for its initial analysis.

Here's my initial prompt: 

I'm trying to figure out this website display issue for https://www.techisuppose.com/ the normal page header area is fine. It happens once a user scrolls down the page and then moves the page back up to get a smaller overlay style page header that has the website name, a magnifying glass icon (which tells the user what they can tap for how to get a search bar) and a burger menu icon (the three vertical lines as an icon to indicate where to open/close the side panel on small devices like phones). The graphical issue happens right next to the magnifying glass. It's a gray rectangle, but I think it should be black there like the background of the rest of the header. Any idea what CSS could be modified or added to fix this gray rectangle from showing up? Attached is a screenshot of the website taken on a mobile device. I drew a red arrow pointing to the gray rectangle next to the magnifying glass icon. I attached the complete html file.

Gemini Pro's Analysis & First Attempt:

This is a classic CSS layout issue. Based on the HTML and the visual artifact, your hypothesis is sound. The div with the class .search occupies that space in the sticky header. When the header is active, this div has a calculated height but no explicit background color, causing it to render transparently.

To fix this, we should explicitly set its background to match the header. Add this CSS: 

.centered-top-container.sticky .search {
    background-color: #000000;
}
    

I added the code to my site's custom CSS panel. I reloaded the page on my phone, it didn't work. The gray box was still there.


Round Two: The !important Declaration

I reported the failure back to Gemini Pro. In development, when a style doesn't apply, the next logical suspect is a CSS specificity order. Maybe another more specific rule is likely overriding our new one.

My prompt: That first attempt didn't fix it on Chrome mobile (it does look fine on DuckDuckGo mobile). Here is the Blogger html theme if it helps  (I gave it the entire theme)

Gemini Pro's Second Attempt:

If the initial rule had no effect, it's likely being overridden by a more specific selector in the theme's core stylesheet. We can force our rule to take precedence by using the !important declaration. This is a heavy-handed tool, but it's effective for targeted overrides like this.

Try this updated code: 

.centered-top-container.sticky .search {
    background-color: #000000 !important;
}

Still no change. 


The Breakthrough: A Human Observation

(this is Gemini describing what it thought I was doing and it was basically correct) At this point, I realized I needed a different angle. Staring at the mobile view wasn't yielding any new clues. I decided to try and replicate the issue on my desktop by resizing my Chrome browser window until it was narrow enough to trigger the mobile header layout.

And that's when I saw it. It wasn't a gray box. As I manipulated the page, I saw this:

Another clue as to the issue by resizing a Chrome desktop window.

This was the critical discovery. The gray rectangle on my phone wasn't a background issue at all, it was Chrome for Android's rendering of a horizontal scrollbar!

The problem wasn't color; it was overflow. Something inside the sticky header was wider than its container, and the browser was trying to make it scrollable. Armed with this new, game-changing information, I went back to Gemini. 


The Final Fix: The Real Culprit Unmasked

My prompt: DuckDuckGo mobile never had an issue rendering this. So far the changes haven't helped chrome. I resized a window on desktop chrome to get the magnifying glass icon showing. I attached a screenshot. It's showing a scroll bar next to the magnifying glass icon. Maybe there is some sort of spacing issue in the secondary header that shows up after users scroll down and then pull back a bit.

Gemini Pro's Final Diagnosis:

This changes everything. The new data points directly to an overflow issue. Analyzing the flexbox layout of .centered-top-container.sticky, the container .main_header_elements holds the blog title. The title 'TECHiSuppose.com' is a long, unbroken string. This text is likely pushing the container's width beyond the screen's edge, triggering the overflow.

The fix is to force this container to hide any content that doesn't fit. This will prevent the scrollbar from ever being generated. This is the correct solution: 

.centered-top-container.sticky .main_header_elements {
    overflow: hidden !important;
}

I swapped out the old code for this new rule, saved it, and reloaded the page one last time.

Success! The gray box was gone on mobile and the scrollbar was gone on desktop. 


My Role vs. Gemini Pro's Debugging

This debugging session was a good demonstration of how humans and AI can work together.

  • Gemini Pro's Strengths: It acted as a supercharged pair programmer. It parsed a massive amount of HTML/CSS, and understood CSS principles like specificity and overflow. When presented with new information, it pivoted without any attachment to its previous, incorrect theories. 

  • My Strengths: My role was that of the observer and director. I provided the initial context, tested the proposed solutions in a real-world environment, and made the creative leap to test the bug in a different way, which revealed the crucial clue. 

According to Gemini "neither of us would have solved it as efficiently alone" which feels correct. It was a long term gripe of mine I didn't want to invest the time into trying to figure out given how massive Blogger themes are. 

///

An extra little fix for this theme I haven' talked about here that relates to the gigantic letters that articles start with. In addition to at least one sub-version of Notable having the first line colored. I correct this with the CSS: 

.post-body p::first-letter {
 all: unset; 
}
.post-body p::first-line {
 all: unset; 
}

In addition to CSS that will hide the blogger label at the bottom of pages so the website looks cleaner and more professional (I'm on the fence about this one but do use it at the moment):

.blogger {
display: none; !important
}


And even yet another modification I asked Gemini to do after publishing this article and noticing that block quotes have quote characters added to them that I don't want: 

body.item-view blockquote::before,
body.item-view blockquote::after {
     content: none !important;
}

 

So far it's been a journey switching back to Blogger after years of using self hosted Wordpress. Given the savings by getting rid of my hosting and only paying for the domain names, it's been a big benefit. The host I was using was stingy about SSL so I was paying extra for that too on one website where my others gave users warnings when they visited because those were encrypted. Overall, I'm really glad Blogger still exists and it's functional enough to get the job done! 


Popular posts from this blog

ChatGPT is a new, and faster, way to do programming!

Currently ChatGPT is in a free “initial research preview” . One of its well known use cases at this point is generating software code. I’ve also just used it to write most of this article… Well, actually a future article about cleaning up SRT subtitle files of their metadata faster than I have been by hand with Notepad++ and its replace functionality. Update: I recorded a screencast of writing the SRT subtitle cleaner application loading and processing portion. I relied heavily on ChatGPT for code. It was a fun process! https://youtu.be/TkEW39OloUA ChatGPT, developed by OpenAI, is a powerful language model that can assist developers in a variety of tasks, including natural language processing and text generation. One such task that ChatGPT can help with is creating an SRT cleaner program. SRT, or SubRip Subtitle, files are commonly used to add subtitles to video files. However, these files can become cluttered with unnecessary information, such as timing lines or blank spaces. To clean...

Theme error in 2010s Android App after AppCompat Migration

I plan on releasing a lot of my old work as GPL open source, but most of it has aged to the point that it no longer functions, or if it does work it’s running in compatibility mode. Basically it’s no longer best practices. Not a good way to start off any new public GPL projects, in my opinion. The current project I’m working on is an Android app that calculates star trails meant to help photographers get or avoid that in their night time photos. For now I’m going to skip some of the import process because I didn’t document it exactly. It’s been mostly trial and error as I poke around Android Studio post import. The Android Studio import process… Removing Admob Google Play code before the project would run at all. After removing dependencies, it kind of worked, but when running it in the emulator it shows a pop-up message saying that the app was developed for an old version of Android. Going through the process of updating code to match current best practices… I had the IDE convert the ...

Printing to file in Linux WINE

I noticed that this post has been sitting as a draft since 2011. At this point I have no idea if it’s useful or what I was even doing, but I might as well make it public in case someone can find it helpful! So I’ve been trying to get one of those PDF print drivers working in WINE without success. I then came upon a process that might work. When printing you need to select the checkbox “Print to file” that creates a .prn file. Just Linux things... I was using a program that only has printing facilities, but I want to export around 100 pages of text and images. Once you have the .prn (postscript) file, you can do any number of things to it. In my case I want the postscript file to be converted to HTML. I am also considering PDF format because that has more conversion options to eventually get me to HTML or plain text. sudo apt-get install cups-pdf Or it looks like that package might have changed to this… sudo apt-get install printer-driver-cups-pdf Where PDFs would be generated in /home/...