-
AuthorPosts
-
January 31, 2019 at 8:57 pm #1061166
Hello. A year or two ago (don’t recall exactly when), you guys helped me create a custom header widget area for a credit union bank client of mine requiring a customer log-in at the top of their site above the nav bar. The customization only required a small snippet of code added to the end of the functions.php file, which then allowed me to add content to this area via the widgets dashboard.
This is the code we added:/* * Custom header widget for CAPE log-in form */ add_action( 'ava_main_header', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'header' ); }
I’m currently using a Custom HTML widget to display the client logo on the left and form on the right with column shortcodes. This has worked great to this point, but now the bank is changing systems and has provided me with a new form code snippet to replace the one that’s currently been in that space. The issue is that now the new form’s formatting gets thrown off when placed inside the widget. The “Login ID” text and “Submit” button get pushed down in the vertical space of the form’s table. I’m thinking this is probably a simple CSS fix, but I’m currently unable to sort it out.
I tested the form code on a regular page and it formats just fine (all elements align nicely). But when placed in the header widget, the formatting breaks. I’m hoping there’s an easy CSS fix for this and you might be able to help me out. They need this new form to go live tomorrow, so I’m hopeful for a quick resolution. I’ve provided links to the staging site in the private content section below, along with access credentials in case you need to check that.
Thank you so much,
ChrisFebruary 1, 2019 at 6:48 am #1061384Alright, so after more digging into my issue, I was able to resolve the majority of the problems I was having. The snippet of code I was given was actually taken from another bank’s website that uses the same customer account management system. The form was updated with links specific to my client, but it had some additional styling elements that I had to remove/tweak.
The only issue it appears I’m still having is that there’s a 20 px margin beneath the form input field, and I’m not sure where that is coming from. When inspecting the element, I can see
margin-bottom: 20px;
, but I’m not sure where I can remove that margin to eliminate the extra space.If you can help with this, I should be good to go. Thanks so much.
February 3, 2019 at 3:16 pm #1062236Hi stratix,
Glad you got most of it working for you! :)
If you need further assistance please let us know.
Best regards,
VictoriaFebruary 3, 2019 at 3:25 pm #1062242Hi,
Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child theme’s style.css file:
CSS Snippet:
/* CSS - */ .responsive #top #header .widget form, .responsive #top #header .widget form table { margin-bottom: 0px !important; }
Best regards,
VinayFebruary 4, 2019 at 9:27 pm #1062864Hi Victoria, thanks for the reply. I’ve annotated the screenshot you shared. You can see a link to it in the private content section.
Unfortunately the CSS provided by Vinay didn’t seem to work, although I appreciate the suggested update.
I’ve shared the form code in the private section as well, in case something obvious to you pops out in that code that may be causing my issue.
February 5, 2019 at 5:42 am #1063004Hi,
I took a look at your form and found that the 20px bottom margin is coming from “iframeid”
to correct, use this css:#top #custom_html-2 input#iframeid { margin-bottom: 0px !important; }
Best regards,
MikeFebruary 6, 2019 at 7:22 pm #1063729Mike thank you so much, that did it. I knew it had to be something relatively simple, but the fix was evading me.
Again, thanks to everyone for the terrific support on this.
-Chris
February 7, 2019 at 5:33 am #1063819Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Form styling issue in custom header widget – Hopefully a simple CSS fix?’ is closed to new replies.