Skip to content
Discussion options

You must be logged in to vote

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 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…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by AhmadJeddi
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug GitHub or a GitHub feature is not working as intended Profile Showcase your work on GitHub with a personalized profile, bio, contributions and pinned repositories Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates Other Features and Feedback Discussions that fall into "Other" category
2 participants