Jump to content

Coding for both mobile & computer

Recommended Posts

  • Replies 5
  • Views 456
  • Created
  • Last Reply

I think you mean something like desktop: @media only screen and (min-width:641px)

And this code is to view on mobile: @media only screen and (max-width:640px)

In other words for desktop 641px and above get one set of rules and for mobile 640px and less another set of rules.

Now when you don't care how a rule-set works on desktop or mobile then you don't use @media at all, in general. But some times you need to make alterations between the two platforms and so you need to tweak one or the other, or both.

Not sure if that helps you.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thanks for your time that's great.

It seems that this code: 
@media only screen and (max-width:640px)
works to apply a rotating image on mobile.

And this code: 
@media only screen and (min-width:640px){
works to apply a rotating image on desktop.

But I how can I get the rotating image code to apply to both mobile and desktop at the same time?

Link to comment
On 2/13/2021 at 12:47 PM, organic_emma said:

Thanks for your time that's great.

It seems that this code: 
@media only screen and (max-width:640px)
works to apply a rotating image on mobile.

And this code: 
@media only screen and (min-width:640px){
works to apply a rotating image on desktop.

But I how can I get the rotating image code to apply to both mobile and desktop at the same time?

change min-width:640px to min-width: 1px

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.