-
AuthorPosts
-
February 25, 2019 at 10:54 pm #1071509
Hi All,
Running the latest Enfold theme over here with a clients site:
I’ve been able to create a widget in the header (to the right of the logo) using another thread here – above link appears as the block of text called ‘Questions about Impaired Driving…’
What I’m needing to achieve is to have a SECOND text widget (just like the first) but needs to be to the right of the first Widget. So header of the site would go: LOGO — WIDGET 1 — WIDGET 2 AND have all three tile correctly on mobile devices…
Functions.php updated to:
add_action( ‘ava_before_bottom_main_menu’, ‘enfold_customization_header_widget_area’ );
function enfold_customization_header_widget_area() {
dynamic_sidebar( ‘header’ );
}CSS updates in the Theme admin I have these set to:
#header_main .widget {
float: right !important;
padding: 10px 0 20px;
width: 65%;
}#header_main .textwidget {
line-height: 24px;
}@media screen and (max-width: 768px) {
#header_main .widget {
float: left !important;
width: 100%
}
}By no means am I an expert, but added this to the the functions file (creates a second widget ok – BUT have no idea what to use for CSS code… unfortunately as-is it just puts it below the first widget :(
add_action( ‘ava_before_bottom_main_menu’, ‘enfold_customization_header_widget_area’ );
function enfold_customization_header_widget_area() {
dynamic_sidebar( ‘header’ );
dynamic_sidebar( ‘header-two’ );
}March 1, 2019 at 7:08 am #1072923Hey valianthosting,
Thank you for using Enfold.
What did you add in the “header-two” widget area? currently, we can only see a single widget in the header container. Please add a widget to it so that we can inspect the element and provide the necessary css code.
Best regards,
IsmaelMarch 1, 2019 at 7:21 am #1072931Hi Ismael,
Thanks for your note! Added in the text the client is wanting: https://keysplease.net/safe/
As you can see, these are tiering on top of each other – rather than being side by side. Any CSS code suggestions you can provide? Naturally with mobile, ideally it would tile the logo first, then the first block of text, then the second.Thanks! ~ Jess
March 2, 2019 at 4:52 am #1073493Hi,
Thanks for the update.
Remove this css code..
#header_main .widget { float: right !important; padding: 10px 0 20px; width: 65%; }
.. then replace it with the following.
#header_main .widget { max-width: 380px; width: 40%; float: none !important; display: inline-block; margin-left: 5%; } #header_main #custom_html-2 { margin-left: 493px; }
You may need to adjust that code using css media queries or just remove the widget altogether for mobile view.
// https://www.w3schools.com/css/css_rwd_mediaqueries.asp
Best regards,
IsmaelMarch 2, 2019 at 5:19 am #1073503Hi Ismael,
Unfortunately doesn’t work – please see the below:
Second block now lands below the logo (over top of the rotating banner). Thoughts?
Thanks, Jess
March 4, 2019 at 5:58 am #1074149 -
AuthorPosts
- You must be logged in to reply to this topic.