Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Add Search Form to Submenu
Topic Started: Mar 25 2008, 05:53 AM (2,303 Views)
Spark
Member Avatar
Nukem Corporation
[ *  * ]
I'm impressed Nicola..
Offline Profile Quote Post Goto Top
 
Ambrosia
Member
[ *  * ]
Nice code you made there, and good decision to share it with the rest.

Tell me if it supposed to look like this.
Because I highly doubt it.

http://s1.zetaboards.com/Individual/index/

In the pictures the search thing is nicely positioned within the submenu.
Mine is a bit below the submenu, you allready know which theme i'm using.
Vector'd, so if you want help me get it in the submenu without those black lines or it widthening my submenu.
Offline Profile Quote Post Goto Top
 
Victrixs
Member Avatar
Website Developer
[ *  *  * ]
Awesome code but I already got enough searches on my site lol, but still great code!
Offline Profile Quote Post Goto Top
 
BRYN
The Guy with the Things for the Stuff
[ *  *  * ]
Ambrosia
May 24 2008, 03:52 AM
Nice code you made there, and good decision to share it with the rest.

Tell me if it supposed to look like this.
Because I highly doubt it.

http://s1.zetaboards.com/Individual/index/

In the pictures the search thing is nicely positioned within the submenu.
Mine is a bit below the submenu, you allready know which theme i'm using.
Vector'd, so if you want help me get it in the submenu without those black lines or it widthening my submenu.
The reason it's like this is due to the image used in the submenu.

The image (20px) is smaller than the input field and the padding used in the submenu.

My only suggestion would be to add this to your CSS (around where you added the code's CSS):
Code:
 
#submenu input[type="text"] {
padding:1px 2px;
}
#submenu button {
padding:1px 2px 0px;
}
Also, after that, find the #submenu that was in Nicola's code, and change the height in it from 20px to 14px.
Offline Profile Quote Post Goto Top
 
yellowdartx
Member Avatar
Zombie!!!
[ *  * ]
Thanks Nicola your the best!
Offline Profile Quote Post Goto Top
 
Ambrosia
Member
[ *  * ]
BRYN
May 24 2008, 08:32 PM
Ambrosia
May 24 2008, 03:52 AM
Nice code you made there, and good decision to share it with the rest.

Tell me if it supposed to look like this.
Because I highly doubt it.

http://s1.zetaboards.com/Individual/index/

In the pictures the search thing is nicely positioned within the submenu.
Mine is a bit below the submenu, you allready know which theme i'm using.
Vector'd, so if you want help me get it in the submenu without those black lines or it widthening my submenu.
The reason it's like this is due to the image used in the submenu.

The image (20px) is smaller than the input field and the padding used in the submenu.

My only suggestion would be to add this to your CSS (around where you added the code's CSS):
Code:
 
#submenu input[type="text"] {
padding:1px 2px;
}
#submenu button {
padding:1px 2px 0px;
}
Also, after that, find the #submenu that was in Nicola's code, and change the height in it from 20px to 14px.

That worked well, looks better now.
But is there a way I can position it little more to the top?
In IE7 there's still a part that's hanging out of the bar.
Without changing the size of it, just want it to be bar.
Edited by Ambrosia, May 25 2008, 03:55 PM.
Offline Profile Quote Post Goto Top
 
BRYN
The Guy with the Things for the Stuff
[ *  *  * ]
Ambrosia
May 25 2008, 05:58 AM
That worked well, looks better now.
But is there a way I can position it little more to the top?
In IE7 there's still a part that's hanging out of the bar.
Without changing the size of it, just want it to be bar.
This is one of those bad browser issues.
Firefox sees this as okay, but IE is making padding an issue, and it's pushing the search bar down.

A solution to this using CSS would change things for all browsers, making a mess.
The best solution I can give would be via jQuery.

To add this, go to the Themes section in the ACP, and find Vector'd (or whatever you named it).
Click "Edit Theme Layout" and add this at the very end (after a few spaces):
Code:
 
<script type="text/javascript">
//<![CDATA[
if ($.browser.msie) {
$("#submenu span.left").css("margin-top", "-3px");
}
//]]>
</script>
This will change the CSS property of it in all versions of IE, without altering the other browsers.


If anything is wrong, PM me, as I can't really test this since I don't have this issue.
Offline Profile Quote Post Goto Top
 
Ambrosia
Member
[ *  * ]
You're a genius looks exactly like on Firefox now (except the button is smaller on IE, but who cares).
Start a fan club i'll sign up :P
I'm totally hating the multi browser issues, must be nightmare for coders.
All browsers have their good and bad sides.
My foot_wrap fills the whole screen on FF, while on IE it's alligned left/right of my theme.
If I use reason to edit on IE, it disables my flash movies.
Such a headache, anyways thanks alot for putting time into this.
You did an amazing job in so less time, envy :wub:
Edited by Ambrosia, May 25 2008, 06:24 PM.
Offline Profile Quote Post Goto Top
 
Niknok Seyer
Member Avatar
Member
[ * ]
Nicola
Mar 25 2008, 05:53 AM
Add to Left of Submenu
Posted Image
Doing this makes it 'stick' to the left side of the #submenu, and the links to the right.

First, you'd need to add this CSS to the end of the Theme Appearance. If you feel able, you can put the height for the #submenu where it first occurs in the CSS. The height is needed since the contents of the #submenu will be floated.
Code:
 

#submenu {
height: 20px;
}
#submenu .left, #submenu .right {
vertical-align: middle;
}
#submenu .right {
padding-top: 3px;
}

Depending on the theme you're using, you might want to adjust the height/padding to suit your requirements.

The code:
Code:
 

<script type="text/javascript">
//<![CDATA[
$('<span class="right"></span>').appendTo('#submenu');
$('#submenu a').appendTo('#submenu .right');
$('#submenu').prepend('<span class="left"><form action="' + main_url + 'search/" method="get"><input type="hidden" name="c" value="1" /><input type="hidden" name="f" value="-1" /><input type="text" name="q" value="Search..." onclick="this.value=\'\'" /> <button type="submit">Go</button></form></span>');
//]]>
</script>


If you wanted the links to stick to the left, and the search box to stick to the right, just swap each left for right and each right for left in the CSS and code.
Thanks.

Currently using this one.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · User Created Codes · Next Topic »
Add Reply