Jump to content

Is there a code that will help create a tablet version of the site?

Recommended Posts

 

Hello!

Is it possible to make a tablet version on the website if I use this code for mobile and PC?
 

@media only screen and (max-width:641px) {section[data-section-id="65338dc8e59d651defe297f5"]{display:none}
}

@media only screen and (min-width: 640px) {section[data-section-id="6564a7a8e91d017b119db0ab"]{display:none}
}


I tried to create a new section specifically for the tablet and wrote new code for it, changing the parameters accordingly for the PC version, but it didn't work correctly.
 

@media only screen and (min-width: 641px) and (max-width: 1080px) {
  /* The new section selector, which I have already deleted */
}

@media only screen and (max-width:641px) {section[data-section-id="65338dc8e59d651defe297f5"]{display:none}
}

@media only screen and (min-width: 1081px) {section[data-section-id="6564a7a8e91d017b119db0ab"]{display:none}
}

 

In general, I'm looking for a code that hides the section for the PC and mobile versions of the site but shows it for the tablet.

Or something like that))

Any help would be greatly appreciated!

Edited by the_first_wolf
Link to comment
  • the_first_wolf changed the title to Is there a code that will help create a tablet version of the site?
  • Replies 5
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

21 hours ago, the_first_wolf said:

 

Hello!

Is it possible to make a tablet version on the website if I use this code for mobile and PC?
 

@media only screen and (max-width:641px) {section[data-section-id="65338dc8e59d651defe297f5"]{display:none}
}

@media only screen and (min-width: 640px) {section[data-section-id="6564a7a8e91d017b119db0ab"]{display:none}
}


I tried to create a new section specifically for the tablet and wrote new code for it, changing the parameters accordingly for the PC version, but it didn't work correctly.
 

@media only screen and (min-width: 641px) and (max-width: 1080px) {
  /* The new section selector, which I have already deleted */
}

@media only screen and (max-width:641px) {section[data-section-id="65338dc8e59d651defe297f5"]{display:none}
}

@media only screen and (min-width: 1081px) {section[data-section-id="6564a7a8e91d017b119db0ab"]{display:none}
}

 

In general, I'm looking for a code that hides the section for the PC and mobile versions of the site but shows it for the tablet.

Or something like that))

Any help would be greatly appreciated!

Here is the code

@media only screen and (max-width: 1024px) and (min-width:767px) {
  // code here
}

 

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment

Thank you very much for your reply!
I tried to enter the code and added a new block selector that is intended for the tablet version. But it shows me an error in that line.
Then I changed the parameters of the PC and mobile version accordingly, as indicated here, but this also did not change anything.

49 minutes ago, Web_Solutions said:

Here is the code

@media only screen and (max-width: 1024px) and (min-width:767px) {
  // code here
}

 

image.png.de0e04a97548250f0b309599a674b1c8.png

 

Quote

@media only screen and (max-width:1025px) {section[data-section-id="65338dc8e59d651defe297f5"]{display:none}
}

@media only screen and(min-width:766px) {section[data-section-id="656496dbf4434706092ef4d6"]{display:none}
}

Maybe I'm making a typo somewhere?

Link to comment
1 hour ago, the_first_wolf said:

Thank you very much for your reply!
I tried to enter the code and added a new block selector that is intended for the tablet version. But it shows me an error in that line.
Then I changed the parameters of the PC and mobile version accordingly, as indicated here, but this also did not change anything.

image.png.de0e04a97548250f0b309599a674b1c8.png

 

Maybe I'm making a typo somewhere?

You didn't add the full code there

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

Link to comment
2 minutes ago, the_first_wolf said:
@media only screen and (max-width: 1024px) and (min-width:767px) {
  section[data-section-id="657020723af7d0591121aad6"]{display:none}
}

Thank you!
I added the code and the error disappeared but nothing changed (
Maybe I'm adding something wrong?
Sorry I'm just learning how to use CSS

Can you send me all of code that you added on Custom CSS section?

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

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.