Jump to content

Adjust leading of monospace font in mobile view

Go to solution Solved by tuanphan,

Recommended Posts

Dear Community,

Could anyone suggest how I can adjust, in the mobile view, the distance between the elements of the "Research" section (website: https://sandrabaernreuther.com)

To make it more legible and easier to click in the mobile view, I am trying to change the distance between the lines 

DIGITAL PRIMARY CARE 
HEALTH FINANCING 
REPRODUCTIVE MEDICINE
CHILDBIRTH

However, using line-height does not work as it changes the distance between all lines.

I made this section using Monospace. 

Edited by ChhandakP
Link to comment
  • ChhandakP changed the title to Adjust leading of monospace font in mobile view
1 hour ago, ChhandakP said:

Dear Community,

Could anyone suggest how I can adjust, in the mobile view, the distance between the elements of the "Research" section (website: https://sandrabaernreuther.com)

To make it more legible and easier to click in the mobile view, I am trying to change the distance between the lines 

DIGITAL PRIMARY CARE 
HEALTH FINANCING 
REPRODUCTIVE MEDICINE
CHILDBIRTH

However, using line-height does not work as it changes the distance between all lines.

I made this section using Monospace. 

Hi @ChhandakP

i have just checked on my mobile (iPhone 14 Pro) and the layout displays as below. This spacing does not look too close (in my opinion) so have you managed to resolve? Or do you indeed want a bigger spacing between the lines?

L

IMG_1321.jpeg

Link to comment

@ChhandakP If you're referring to the space between the mobile menu links, you can try this code:

.header-menu-nav-item a {
  margin: 5vw 5vw;
}

The first 5vw (top and bottom link margin) is what I've changed from the current 3vw.

The second 5vw is the default setting for left and right margin.

If this helped you, please like or mark my solution as answer so others can scroll to it quickly 👆

Cass Aggett is a Squarespace website designer for go-getting women – no matter what stage of business.

WEBSITEINSTAGRAM

 

Link to comment
6 hours ago, LouLouHarvey said:

Hi @ChhandakP

i have just checked on my mobile (iPhone 14 Pro) and the layout displays as below. This spacing does not look too close (in my opinion) so have you managed to resolve? Or do you indeed want a bigger spacing between the lines?

L

IMG_1321.jpeg

Thank you for your reply.
Sorry, I should have been more specific. I was not referring to the menu but to the Research section on the home page (as seen in the screenshot). On some screens (such as iPhone SE) when the texts (e.g. "Digital Primary Care") get broken, I want to introduce a bit more leading between the texts to make it understandable that they are separate headings).

I'm using the following code to reduce the font size on mobile screens— 

@media only screen and (max-width: 640px) {
 pre code {
    font-size: 2.3rem !important;
}
}

 

 

Screenshot 2024-01-07 at 11.16.22 AM.png

Link to comment
  • Solution
On 1/7/2024 at 12:54 PM, ChhandakP said:

Thank you for your reply.
Sorry, I should have been more specific. I was not referring to the menu but to the Research section on the home page (as seen in the screenshot). On some screens (such as iPhone SE) when the texts (e.g. "Digital Primary Care") get broken, I want to introduce a bit more leading between the texts to make it understandable that they are separate headings).

I'm using the following code to reduce the font size on mobile screens— 

@media only screen and (max-width: 640px) {
 pre code {
    font-size: 2.3rem !important;
}
}

 

 

Screenshot 2024-01-07 at 11.16.22 AM.png

You can add this code to Website Tools (under Not Linked) > Custom CSS

/* Research section */
@media screen and (max-width:767px) {
div#block-e927e42e24c0be0fcbdc a {
    margin-bottom: 20px;
    display: inline-block;
}
}

 

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
On 1/9/2024 at 2:03 PM, tuanphan said:

You can add this code to Website Tools (under Not Linked) > Custom CSS

/* Research section */
@media screen and (max-width:767px) {
div#block-e927e42e24c0be0fcbdc a {
    margin-bottom: 20px;
    display: inline-block;
}
}

 

Thanks !! It works 🙂 

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.