Profile README badges render vertically when logged out or in Incognito mode #203258
🏷️ Discussion TypeBug 💬 Feature/Topic AreaProfile BodyHello GitHub Team and Community, I would like to report a rendering issue with GitHub Profile README files. My Profile README displays correctly when I am logged into my GitHub account. However, when viewing the same profile while logged out or in Incognito mode, images from shields.io are rendered differently. Specifically, badge images that should appear horizontally are displayed vertically instead. Affected sections include:
I tested multiple approaches, including:
The issue only appears in the public/logged-out view. The same README content renders correctly while logged in. Example behavior:
GitHub profile: Profile README: This issue can be reproduced by comparing the profile in logged-in and logged-out views. Could this be related to differences in the public Markdown/HTML rendering system or CSS sanitization? Thank you for looking into this.
|
Replies: 3 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
I found the root cause of this rendering issue. The problem is related to the CSS applied in the logged-out/incognito public view. GitHub's public Markdown renderer applies the following style: img, picture {
max-width: 100%;
display: block;
}The When logged in, this CSS behavior appears to be different, which is why the same Profile README renders correctly. Removing or overriding Thanks for looking into this. |
|
Hi! We appreciate you reaching out to report this issue. We have provided details about the incident in this discussion. To keep conversations all in one place and to ensure you receive timely updates, we’ll be closing this post and recommend you comment on or subscribe to the discussion linked above. We appreciate your patience as we work toward a solution. |


I found the root cause of this rendering issue.
The problem is related to the CSS applied in the logged-out/incognito public view. GitHub's public Markdown renderer applies the following style:
The
display: block;rule changes the default inline behavior of images. Since shields.io badges are designed to be displayed inline, this causes each badge image to start on a new line, making them stack vertically.When logged in, this CSS behavior appears to be different, which is why the same Profile README renders correctly.
Removing or overriding
display: block;for inline badge images (or providing a more targeted selector for standalo…