Reduce the size and change the police of the title of a widget
-
Hi,
I have a text widget and I would like to reduce the size of it tittle and change the police too. How can I do ?
Thank you ! -
Hi,
It’s here on the right :
http://www.lesptitesmerveillesdeberenice.wordpress.com/category/deco/Thanks
-
Thanks. You can use the following code to change that size:
.widget-title:first-child { font-size: 17px; }To clarify, this will modify the size of the title for the first widget (aka: first-child) ONLY, and not other widgets in the sidebar. Right now that happens to be the text widget of course. :)
-
Thank you.
And for the police ? I would like the same as the title of the site…
Thank you ! -
-
Thanks for explaining. The font is set in the Fonts tab of the site customize, but it is generally speaking not possible to set a different font for just that title.
The only exception are web-safe fonts, which are fonts that everyone who views your site has loaded on their computer. Fonts chosen with this method MUST be installed on the vistor’s computer, however, or a fallback is used.
Here are the most commonly accepted web-safe fonts for Windows and Mac users:
It is possible to change your font to any of the ones listed in that article, however, by adding:
font-family: Verdana;To the .widget-title:first-child style I gave above. You can place the name of any web safe font-family you prefer, by replacing “Verdana” with the name of the font you prefer.
Cheers,
-
Hi,
My problem is that all the tittle is in capital letters and I wanted to change the front to change this, but that doesn’nt change… -
Gotcha. Then you can add the following rule to the above style for .widget-title:first-child
‘text-transform: lowercase;`
Cheers!
-
-
This is like this it’s have to be :
Les p’tites Merveilles de Bérénice
<h6>Les p’tites Merveilles de Bérénice</h6>with capital letters and lower case letters.
Thank you ! -
Euh… Now all the text is in small letters / lower case letters…
:/Ah, you’re quite right. It should have been:
‘text-transform: none;`
That will give you standard text, where the words you capitalize in the widget settings are correctly capitalized on the site.
Cheers!
-
All my tittle font in the sidebar have change except for the 7th widget…
But I would like to change just the first widget tittle font.
Thank you. -
In this case, perhaps it would be better to target ID of that widget instead, so use
#text-3 .widget-titleinstead of
.widget-title:first-childYou may also want to consider combining some of your styles. You don’t need to use a separate declaration for every change you make to the same element. For example, this combined declaration will work in the place of the 3 separate declarations you have currently for .widget-title
#text-3 .widget-title { font-size: 22px; text-transform: none; font-weight: bold; }Cheers!
-
- The topic ‘Reduce the size and change the police of the title of a widget’ is closed to new replies.