Jump to content

Coding for both mobile & computer

Recommended Posts

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.

Edited by creedon

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?

Edited by organic_emma
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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.