A common problem Genesis theme users want to solve is styling the header right widget.
This widget is included in most Genesis child themes.
Here’s the selector which you target to style with CSS code:
#header .widget-area {}
First step is to change the line height
#header .widget-area {
line-height: 1.6875;
}
Then we’ll change the font size:
#header .widget-area {
line-height: 1.6875;
font-size: 16px;
font-size: 1rem;
}
We’ll use both rem and pixel values for the font size:
Based on these values, 1 rem = 16 pixels
Now we’ll change the font style by adding a font family:
#header .widget-area {
line-height: 1.6875;
font-family: Georgia, Times Roman, Arial;
font-size: 16px;
font-size: 1rem;
}
Now lets change the font color:
#header .widget-area {
line-height: 1.6875;
font-family: Georgia, Times Roman, Arial;
font-size: 16px;
font-size: 1rem;
color: #fff;
}
Lets now position our widget to float to the right of the header area:
#header .widget-area {
float: right;
width: 25%;
line-height: 1.6875;
font-family: Georgia, Times, "Times New Roman", serif;
font-size: 16px;
font-size: 1rem;
color: #fff;
}
You can easily float your widget to the left and change the width to another percentage by editing the values for the properties in your CSS declarations.
If you want to use a special font, you can easily install Google fonts and use the font family name in the values above. Example:
font-family: Lustria;
If you need to remove the header right widget area altogether, paste this code into your child themes functions.php file:
unregister_sidebar( 'header-right' );
Styling Other Widgets
You can also create a custom widget anywhere there’s a Genesis hook and style it using the code above.
Leave a Reply
You must be logged in to post a comment.