I would like to reduce the size of the header font on mobile because it splits up into 2 lines.
Thank you!
URL: https://suq5b8csct01fyzg-61270851797.shopifypreview.com/collections/rappid-test
Im using the Trade theme.
Goal: Reduce the announcement bar text size on mobile so it doesn’t wrap onto two lines (Trade theme).
Clarification: The target is the announcement bar header. A screenshot was provided to illustrate the issue, and a code snippet is central to the solution.
Proposed fix: Edit theme code via Online Store → Themes → … → Edit Code, then open Assets/base.css and add responsive CSS.
Technical context: Media queries are CSS rules that apply only under certain screen widths, allowing smaller font sizes on narrower devices to prevent text wrapping.
Caveats: In the corrected snippet, one selector appears to have a typo (“a nnouncement-bar__message.h5”), which may need fixing. No confirmation yet from the requester that the change resolved the issue; discussion remains open.
I would like to reduce the size of the header font on mobile because it splits up into 2 lines.
Thank you!
URL: https://suq5b8csct01fyzg-61270851797.shopifypreview.com/collections/rappid-test
Im using the Trade theme.
Hi @KimGottwald
Which header your referring to?
Instructions
Go to ‘Online Store’ → Theme
At your Active theme click on 3 dots (…) → Edit Code
In the Assets Folder locate the file ‘base.css’
At the end of the file paste the below code
@media (max-width: 308px){
.announcement-bar__message.h5{
font-size: 7px;
}
}
@media (max-width: 334px){
.announcement-bar__message.h5{
font-size: 8px;
}
}
@media (max-width: 360px){
.announcement-bar__message.h5{
font-size: 9px;
}
}
@media (max-width: 385px){
.announcement-bar__message.h5{
font-size: 10px;
}
}
@media (max-width: 411px){
.announcement-bar__message.h5{
font-size: 11px;
}
}
@media (max-width: 426px){
.announcement-bar__message.h5{
font-size: 12px;
}
}
Corrected Version
@media (max-width: 309px){
.announcement-bar__message.h5{
font-size: 7px;
}
}
@media (max-width: 335px){
.announcement-bar__message.h5{
font-size: 8px;
}
}
@media (max-width: 361px){
.announcement-bar__message.h5{
font-size: 9px;
}
}
@media (max-width: 386px){
.announcement-bar__message.h5{
font-size: 10px;
}
}
@media (max-width: 412px){
.announcement-bar__message.h5{
font-size: 11px;
}
}
@media (max-width: 427px){
.announcement-bar__message.h5{
font-size: 12px;
}
}
It’s important to start from 309px and go to 427px and not from 427px to 309px