News:

Wondering if this will always be free?  See why free is better.

Main Menu

Change font-weight in drop-down menus

Started by Speed King, January 03, 2023, 01:45:36 PM

Previous topic - Next topic

Speed King

Hello,

I use custom font in my forum. The font is called Lora:

https://fonts.google.com/specimen/Lora

By default, items in drop-down menus are loaded with normal font weight (400) and it's hard to read for me.

Click =>

I wish to increase font-weight in those menus to Medium (500), but cannot find the proper code in index.css file.

Sesquipedalian

Unfortunately, there's not much you can do about that. It's controlled by the browser, not the site's CSS.

EDIT: Actually, the font weight is one of the few things you can control. Make this change in index.css:

Code (Find) Select
select {
padding: 0.22em 0.2em; /* selects don't apply line-height */
}

Code (Replace) Select
select {
padding: 0.22em 0.2em; /* selects don't apply line-height */
font-weight: 500;
}
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Speed King

I made this edit in index.css, but only text in select field is changed, not the drop-down menu.

Click =>

Speed King

Problem solved for now, by changing font-weight in font declaration:

@font-face {
font-family: 'Lora';
font-style: normal;
font-weight: normal;
src:local("Lora"), url('https://bg-nacionalisti.org/fonts/Lora-Regular.woff2') format('woff2');
}

Changed to:

@font-face {
font-family: 'Lora';
font-style: normal;
font-weight: 500;
src:local("Lora"), url('https://bg-nacionalisti.org/fonts/Lora-Regular.woff2') format('woff2');
}

But I don't know if that will affect text in another forum places  ::)

Advertisement: