Archived topic
Element not in the same line in the primary navigation
5 replies · Started by Ender on February 24, 2019
I was able to install the search function from plugin AjaxSearch via shortcode into the navigation header using the elements function with the hook in „inside navigation“.
The Search should appear on the right side in the desktop navigation.
<?php echo do_shortcode('[wd_asp id=1]');?>
How I can get the it on the same line?
Hi there,
try this CSS:
@media (min-width: 768px) {
#site-navigation .inside-navigation {
position: relative;
display: flex;
}
div.asp_m.asp_m_1 {
position: absolute;
bottom: 0;
right: 0;
top: auto;
}
}
Hello David.
Thank you very much. I add now the code.
However, the problem could not be solved completely.
When the search button is pressed, there is no longer a shift and that's good.
However, both the navigation and the search button are below the logo under a new line, which is not intended.
All elements, i.e. logo, navigation and search button should be on the same line.
How could the problem be solved?
PS: Do you know how I can upload an avatar in this forum for me?
I edited the code above which will make the logo inline.
The forum uses Gravatars:
https://codex.wordpress.org/How_to_Use_Gravatars_in_WordPress
Thank you so much. That has solved the problem.
Glad to be of help.