Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

How to resize Markdown font size for mobile?


Scaleupmarketing

Question

Hi,

In my website I have a markdown block inserted with an h2 text.

On mobile, however, the h2 size is too large and does not display properly.

I can target h2 individually with simple CSS of course but that does not target the h2 within the Markdown block.

Whatever I do, the h2 does not change size.

 

Is there any CSS or Markdown code that I can use to specifically target the font-size of the content within a markdown block for mobile/tablet?

 

The Markdown code used is this:

<pre><h2><div style="text-align:center"><span style="color:#7B004E">MEER TRAFFIC      |      GEKWALIFICEERDE LEADS      |      MEER SALES</span></div></h2></pre>

 

Thanks!

Boudewijn

Link to post
  • Answers 12
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Popular Posts

@Scaleupmarketing @media screen and (max-width:640px) { h2 span {font-size: 10px !important;} }  

12 answers to this question

Recommended Posts

  • 1

@Scaleupmarketing

@media screen and (max-width:640px) {
h2 span {font-size: 10px !important;}
}

 

Link to post
  • 0

@tuanphan

What if you want to do the same thing but are not using H2 in your markdown. For example this is my markdown block and when it turns to mobile, the text gets broken on multiple lines instead of showing as

COLUMBINE
RESIDENCE

Is there a way to target that specific span style?

</div>
<div style="text-align:center; margin-top:-3.5%">

<span style="color:white; font-family:cormorant; font-size:4em; font-weight: 800; letter-spacing: 1rem">

COLUMBINE RESIDENCE  
  </span>

</div>

Link to post
  • 0
1 minute ago, StudioRhodes said:

@tuanphan

What if you want to do the same thing but are not using H2 in your markdown. For example this is my markdown block and when it turns to mobile, the text gets broken on multiple lines instead of showing as

COLUMBINE
RESIDENCE

Is there a way to target that specific span style?

</div>
<div style="text-align:center; margin-top:-3.5%">

<span style="color:white; font-family:cormorant; font-size:4em; font-weight: 800; letter-spacing: 1rem">

COLUMBINE RESIDENCE  
  </span>

</div>

Can you share link to page where you inserted Markdown?

Link to post
  • 0
On 11/26/2020 at 7:22 PM, CGKids said:

@StudioRhodes did you ever get an answer to the above question?  I have the same one.  Let me know.

If you share link to page where you use Markdown. We can check easier

Link to post
  • 0

Hey, sorry about the delayed response.  For some reason I didn't see that you had responded.  I don't know if I can share a link for you to look at.  I'm in the process of redesign my site and changing templates so everything I see is the preview of the new template (7.0 brine).  Here is the markdown code I'm using...

<span style="font-family:Calluna; font-size:3.3em;">Text Goes Here</span>

I'm just not quite sure how to tweak your code below.

@media screen and (max-width:640px) {
h2 span {font-size: 10px !important;}
}

Let me know.  Really appreciate it!

Link to post
  • 0
1 hour ago, CGKids said:

Hey, sorry about the delayed response.  For some reason I didn't see that you had responded.  I don't know if I can share a link for you to look at.  I'm in the process of redesign my site and changing templates so everything I see is the preview of the new template (7.0 brine).  Here is the markdown code I'm using...

<span style="font-family:Calluna; font-size:3.3em;">Text Goes Here</span>

I'm just not quite sure how to tweak your code below.


@media screen and (max-width:640px) {
h2 span {font-size: 10px !important;}
}

Let me know.  Really appreciate it!

Edit to this

<span style="font-family:Calluna; font-size:3.3em;" class="t-text">Text Goes Here</span>

then add this to Design > Custom CSS

@media screen and (max-width:767px) {
	span.t-text {
		font-size: 20px !important;
}
}

 

Link to post
  • 0
On 12/16/2020 at 5:11 PM, CGKids said:

Just curious.  Why did you make it 767px instead of 640px?

If you use SS 7.1, use 767

SS 7.0, use 640

Link to post

Create an account or sign in to comment

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


×
×
  • Create New...