Jump to content

Want to remove italics in one text block *on mobile phones only*

Recommended Posts

Posted

Hi all!

 

There are a few sentence in italics on my website - looks great on the computer. But I want those sentence *not* to be in italics on mobile view. I'm trying this code (below) but it's not working. I would so appreciate any help.

Thank you!

@media screen and (max-width:767px) p2 {
div#block-46fb0b3b0ec8b69d2b6c {
    font-style: normal !important;
}
}
 

  • Replies 4
  • Views 652
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

take out the p2, and check the block id. that doesn't look right to me, you're better using sections. if you want it to be everywhere then you can probably just use body, but if you're trying to use specific pages, sections then download the Squarespace ID Finder chrome extension and find the relevant section id for your site/page.

@media screen and (max-width:767px) {
  body {
      font-style: normal !important;
  }
}

 

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

Posted
31 minutes ago, iamdavehart said:

take out the p2, and check the block id. that doesn't look right to me, you're better using sections. if you want it to be everywhere then you can probably just use body, but if you're trying to use specific pages, sections then download the Squarespace ID Finder chrome extension and find the relevant section id for your site/page.

@media screen and (max-width:767px) {
  body {
      font-style: normal !important;
  }
}

 

Hi! Thank you for responding!

 

So I don't want the whole section - just 3 sentences. I want to leave the rest of the section as-is. And the blockID is correct - I just copied it from that id-finding chrome extension.

 

Would be very grateful for any other suggestions! 

Posted

ok, so just put the block id back in then, that should do it. and add a * to make it apply to all elements inside that block

@media screen and (max-width: 767px) {
  #block-46fb0b3b0ec8b69d2b6c * {
      font-style: normal !important;
  }
}

 

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

Posted
11 hours ago, iamdavehart said:

ok, so just put the block id back in then, that should do it. and add a * to make it apply to all elements inside that block

@media screen and (max-width: 767px) {
  #block-46fb0b3b0ec8b69d2b6c * {
      font-style: normal !important;
  }
}

 

This worked! Thank you so much for helping me!!

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.