Nav Bar Help request
-
Below is the code I have in my Header, Searchform and my Stylesheet relating to my nav bar. The problem is with the Search bar. While it works in Firefox, I cannot get it to work in IE. I understand CSS needs adjustments to work in IE, however, I cannot figure it out. I do have a special stylesheet for IE6, but don’t know what code to add. Recommendations greatly appreciated.
Site: http://www.9001ventures.com
Header/Searchform/Stylesheet Code: http://www.9001ventures.com/navbarcode.txt
-Scott
-
There’s a Javascript error being reported in IE6 but other than that, the search seems to work fine.
Thank you for the reply.
First, how did you validate the javascript?
Pardon in advance, but the present location of the search bar on 9001ventures.com is working fine in the sidebar, however, I cannot get it to work in the nav bar. The code txt file sited above is what I have for the nav bar located in the search bar.
Maybe it would be better to simply ask how Firefox and IE differ in defining CSS or other style changes.
-Scott
how did you validate the javascript?
I didn’t. IE6 reported the error (lower right – status bar). Unfortunately, it never offers much in the way of additional information. However, since I didn’t get a similar report in IE7, I assume it’s an IE6-specific issue.
present location of the search bar on 9001ventures.com is working fine in the sidebar, however, I cannot get it to work in the nav bar
Ah! I’ve had a look at your searchform.php and I can’t see anything within it that would cause a problem, so I think it is indeed a CSS problem. Unfortunately, it’s impossible to summarise the CSS differences between Firefox and IE7 because so much relies upon the context in which the relevant styling is applied. I normally carry out all the initial work in Firefox and then apply fixes for IE via a conditional stylesheet – which you said you have in place already (albeit empty).
You say that the the searchbox “doesn’t work” in IE. In what way? Could you place the search form back in the nav bar so I can see it on the site? If this is a CSS problem, it could be as simple as applying a little extra positioning via the IE specific stylesheet. However, I’d suggest that you first get all of the inline styling out of searchform.php and into your main stylesheet. It will make applying additional CSS so much easier.
SEARCHFORM.PHP
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>"> <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /></div> </form>CSS
#searchform { text-align:right; margin:0; padding:1px; } #searchform #s { width:125px; }Once that’s all in place and the search box is added to the nav bar, I’ll have a look and see if I can come up with some suggestions.
Thank you. I was lazy in separating out the code.
I made the changes and placed the search bar back up on the nav bar.
You’ve got quite a few validation errors on there and at least 1 of them may well be contributing to your problem.
Try placing the call to the searchform inside
<li></li>tags like the rest of the nav menu.Okay, I’m further, but not there yet. It appears class=”artmenu” creates the individual
- enteries, so, per your suggestion, I simply create one more
- . I was able to remove the <div> code as well.
Now my only goal is to get the search bar to align right. I have tried various combinations of <div> and
- tags, but cannot figure it out. I just need the code that will divide nav bar so I can place the search bar on the right.
<div class=”nav”>
<ul class=”artmenu”>
<?php art_menu_items(); ?>- <?php include (TEMPLATEPATH . “/searchform.php”); ?>
<div class=”l”>
</div>
<div class=”r”>
<div>
</div>
</div>
</div>Okay, I’m further, but not there yet. It appears //class=”artmenu”// creates the individual
- enteries, so, per your suggestion, I simply create one more
- . I was able to remove the <div> code as well.
Now my only goal is to get the search bar to align right. I have tried various combinations of <div> and
- tags, but cannot figure it out. I just need the code that will divide nav bar so I can place the search bar on the right.
//<div class=”nav”>
<ul class=”artmenu”>
<?php art_menu_items(); ?>- <?php include (TEMPLATEPATH . “/searchform.php”); ?>
<div class=”l”>
</div>
<div class=”r”>
<div>
</div>
</div>
</div>//Is this the Search in the top right box? It looks fine to me. What’s wrong with it exactly?
The sidebar location is the secondary position. I really wanted it located on the nav bar.
Below is the code that works. My last request is to format the search box to align right on the nav bar and I can’t figure out how to do that.
I made the changes live again…www.9001ventures.com
<div class="nav"> <ul class="artmenu"> <?php art_menu_items(); ?> <li><?php include (TEMPLATEPATH . "/searchform.php"); ?></li> </ul> <div class="l"></div> <div class="r"><div> </div> </div> </div>Try putting a class on the
<li>enclosing the searchform (such asclass="srch") and then add something likeli.srch {float:none;text-align:right;}to style.css
Perfect, that was it…thank you!!
One last request of your knowledge…I want to create a members only section/page and I want to be to build a list from the users. In all, I would like to integrate something like the Butterfly Marketing script into my website. I have read several posts herein, however, none seem to get me to the final, successful result. Any guidance or direction on this topic would be greatly appreciated.
-Scott
Sorry but that’s not something I’ve tried. Closest I got was a client who used Constant Contact (paid 3rd party mailing package) and used that to send out passwords for protected pages that changed on a monthly basis.
Thank you again for your assistance.
-Scott
The topic ‘Nav Bar Help request’ is closed to new replies.