Solved

How do i change the Text Color on the mobile Version only?

JBStore12
Visitor
2 1 0

Hey guys,

 

I would be very happy, if someone could tell me how i change the Text Color, in Mobile Version only in CSS?

I found a code but The Problem is, that it changes the color for the Desktop version too, but i only want it for the mobile version. Can someone help me out?

 

This is a code i tried:

  1. h2 {
  2.   color: #4287f5;
  3. }help2.PNG
Accepted Solution (1)
JBStore12
Visitor
2 1 0

This is an accepted solution.

Hey, i found a fix.

 

I used this code:

 

h2 {
text-align: center;
background-color: white;
border-radius: 0.5em;
padding: 5px 20px 5px 20px;
}
p {
text-align: center;
background-color: white;
border-radius: 0.9em;
padding: 5px 20px 5px 20px;
}

 

It was really difficult for me but it worked out for me 🙂

Thanks for your help.

Bild_2023-08-15_155834482.png

View solution in original post

Replies 2 (2)

pooja_d_92
Shopify Partner
132 16 18

Hey,

Please try this code and paste it in theme.css file:
@media screen and (max-width: 640px) {
h2 {
color: #4287f5;
}
}
Thank you
Pooja D.

Pooja Devi
JBStore12
Visitor
2 1 0

This is an accepted solution.

Hey, i found a fix.

 

I used this code:

 

h2 {
text-align: center;
background-color: white;
border-radius: 0.5em;
padding: 5px 20px 5px 20px;
}
p {
text-align: center;
background-color: white;
border-radius: 0.9em;
padding: 5px 20px 5px 20px;
}

 

It was really difficult for me but it worked out for me 🙂

Thanks for your help.

Bild_2023-08-15_155834482.png