Community Forums › Forums › Design Tips and Tricks › Search Button on Topnav
Tagged: css, lifestyle, search button
This topic contains 7 replies, has 3 voices, and was last updated by jholloman 3 months, 3 weeks ago.
-
AuthorPosts
-
November 27, 2012 at 2:14 am #1816
I am using lifestyle 2.0.2
I have added a topnav bar above the header banner.
I would like to move the search button from the primary navigation to topnav.
How can I do it?
Thanks
November 27, 2012 at 2:27 am #1817I added the following in the topnav.php
<?php get_search_form(); ?>
and now I can get the search button.
What setting should I change in style.css file to position it neatly on topnav?
Thanks
November 27, 2012 at 10:06 am #1863I have adjusted all the relevant margins and padding but I am unable to move up the button so that it is sited in the middle.
How can I move it up?
Thanks
November 27, 2012 at 10:29 am #1870There is a 5px top margin applied by .s
I recommend installing the Firebug add on for Firefox or using Chrome’s Firebug Lite which will enable you to right click on any element to inspect it and determine the associated style rules or the selectors required to create new style rules.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
November 27, 2012 at 11:15 am #1884Thanks for your assistance.
I got it fixed.
You may close the thread .
November 27, 2012 at 12:53 pm #1903January 27, 2013 at 2:51 pm #15399@pete & Sozo,
I just took a peek at your site and I am trying to do the same, add a top nav above the header.
Would you mind sharing your code that used to get the result you wanted.
I added a widget via the functions.php using this code:
genesis_register_sidebar( array(
‘id’ => ‘topnav’,
‘name’ => ‘Top Nav’,
‘description’ => ‘This is top nav above the header.’,
) );I added the simple hooks plugin and called up the nav before the header using this code:
</p> <p class="MsoNormal"><div class="topnav"></p> <p class="MsoNormal"><?php dynamic_sidebar( ‘topnav’ ); ?></p> <p class="MsoNormal"></div></p> <p class="MsoNormal">
Result is I can see the spacing for the nav bar above the header, but the id (#topnav) i created inn the style sheet does not display the topnav bar as I would like.
I’d like to know how you solved this on your site.
JamesJanuary 27, 2013 at 2:54 pm #15403I was just reviewing my post and saw some funky coding.
The code for the simple hooks plugin includes everything after the “MsoNormal” for each line.
James
-
AuthorPosts
You must be logged in to reply to this topic.