Css font family center align font size letter spacing

*Share your use case and provide as many details to support your idea as possible

hello, i’m making a test to see if we can use your menu for our site/restaurants
at the moment i’ve used the LITE Plan
you can see the test live here:

i see the widget picks up the main font style from my website, but i would like to use two different fonts in the menu, plus i would like to center some Names, Caption
i try to center Captions using the visual editor, but it doesn’t keep the edit, once you want to modify…

Basically what i would like is to try to match as much as possible our current menus
, which now are png files, you can see it here:

i can’t make custom css working

any solutions?

2 Likes

Hi @user3019! We are so glad that you’ve joined our Community. Welcome :tada:

Sure thing, we’ll be happy to help you. To do it, we need a bit more details.

Do you need to change the font for all the widget elements or for certain ones? And what fonts you’d like to have?

Also, if I understood you correctly, you’d like only some of the names and captions to be centered, but not all of them. In this case, could you please specify what names and captions should be centered?

1 Like

Hi Max thanks for your prompt answer…
I want to propose your restaurant menu widget to the Hotel i work for.
so I’m making some tests, because i need to create a restaurant menu and a wine list, bar list ecc.
Of course, they need to have all the same style. and i would like to match the existing one, i showed in the link in the previous message.

i’ve noticed that the widget picks up the style from the page where it is embedded, I started to do some testing… adding some style class directly on my page,
this:

.ql-align-center { text-align: center; font-family: Cormorant; font-size: 1.8em; letter-spacing: 0.08em }

it works for some, but not for all the fields.

Just to explain, to have a more clear view of what i’m trying to achieve…
if you looked at our current list , we have
Since our list is in 2 languages Italian and English, there should be a difference between the two
Italian is in Serif - English is in sans-serif
Fonts: Montserrat and Cormorant, (both Google fonts)

elfsight restaurant menu editor has
NAMES CAPTION ITEMS

NAMES: option to change font family, size, center , letter spacing
CAPTIONS: two different font family in the same caption, plus the above.

i can make style directly on my page, but i need to know how the elements are named, to create a class for each

hope is clear…

1 Like

@user3019 Thanks you so much for such a detailed description!

Just to be sure, do I understand correctly that you’d like to have Montserrat for Italian and Cormonant for English?

No, the inverse
since we are in Italy we will have Italian first in Cormorant,
and English to follow in Montserrat.

like in this page
https://terrazzavittoria.exvitt.it/en/wine-list/wine-list-terrazza-vittoria.html

thank you

1 Like

@user3019 Thank you!

I’ve forwarded your request to our devs. I’ll get back to you once I receive any news!

Have a great day :slightly_smiling_face:

Hi @user3019 :wave:

Here are requested CSS codes with the comments for what each block is needed. Also, our devs added some additional codes (e.g Hide Icons) that may be helpful in your use case.

/* Font Names */
[class^='Name__NameComponent-sc'] {
  font-family: Montserrat;
}

/* Font size Names */
[class^='Name__NameComponent-sc'] {
  font-size: 24px;
}

/* Letter spacing Names */
[class^='Name__NameComponent-sc'] {
  letter-spacing: 1.1px;
}

/* Centered Names */
[class^='Name__NameComponent-sc'] {
  text-align: center;
  width: 100%;
}

/* Centering Names relative to the page */ 
[class^='Name__NameComponent-sc'] {
	margin-left: 75px;
	margin-right: 0 !important;
}
[class^='Price__PriceComponent-sc'] {
	width: 75px;
}

/* Font Italy */
[class^='Description__DescriptionComponent-sc'] > *:first-child {
  font-family: Montserrat;
}

/* Font English */
[class^='Description__DescriptionComponent-sc'] {
  font-family: Cormorant;
}

/* Font size */
[class^='Description__DescriptionComponent-sc'] {
	font-size: 16px;
}

/* Letter spacing Caption */
[class^='Description__DescriptionComponent-sc'] {
  letter-spacing: 1.1px;
}

/* Centered Caption */
[class^='SectionsLayoutTabs__ItemsContainer-sc']
[class^='Description__DescriptionComponent-sc'] {
  text-align: center;
  margin-right: 0 !important;
}

/* Hide Icon */
[class^='Icons__IconsComponent-sc'] {
  display: none !important;
}

Please add these codes to the Custom CSS field on the Style tab and let me know if it helped :slightly_smiling_face:

Thank you i will let you know soon

1 Like

thank you for the codes, but i don’t think is working well, not all the elements are aligned properly etc. i think is going to be tricky to have it as i need it.

maybe would be possible to change font for italian, in this image attached
so that only that kind section of text is centered, and all the rest is left-aligned

Italian= Cormorant
English=Montserrat

1 Like

Hi @user3019

If you want to have Cormorant for Italian and Montserrat for English, you just need to change the font names in the codes:

/* Font Italy */
[class^='Description__DescriptionComponent-sc'] > *:first-child {
  font-family: Cormorant;
}

/* Font English */
[class^='Description__DescriptionComponent-sc'] {
  font-family: Montserrat;
}

As for the centering, I guess I could misunderstand you. Do I understand you correctly that you’d like to keep all menu categories centered and all the other elements to be left aligned:

Or would you like to center only Italian (English) menu category and all the other categories (snacks, desserts, spumanti) to be left aligned?