Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Searchbar in Centered Navigation


Go to End


7 Posts   2315 Views

Avatar
pixelwave

Community Member, 18 Posts

11 September 2008 at 9:22pm

Edited: 11/09/2008 9:25pm

Hi,

i want to add a Searchbar to my main navigation according to the image.

so far i implemented the searchbar code and placed it in the header... but when i place the bar in the main nav i doesn't center anymore...

www.p-wave.eu/Silverstripe/

(the attached image is how it "should" look like .. ^^)

Avatar
grilldan

Community Member, 135 Posts

11 September 2008 at 10:45pm

My guess is that it's the css that "un-centers" your search box, or its the html code.

Try this:
1) add the search box in the "navigation" div
2) edit your form.css file (towards the bottom)

#Sidebar input.action {
	font-size: 1.2em;
	float: right;
	padding: 1px;
	margin: -22px 10px 0 0;
}

take out the "float:right"

If that doesn't work, if you pack your theme into a rar file, I'll work on it.

Avatar
pixelwave

Community Member, 18 Posts

11 September 2008 at 11:08pm

thanks a lot man .. i really apprechiate your help.

www.p-wave.eu/bk_theme_search.rar

i added "searchbar_style.png" - file, maybe you get this style working.. and also the "mysite"-folder for the searchbar code

Avatar
grilldan

Community Member, 135 Posts

12 September 2008 at 2:28am

I got it to work in FF and IE7. I don't have a way to test for IE6 without uploading the theme to the web.

http://www.mediafire.com/?sharekey=6e83213e7be4b837d2db6fb9a8902bda

Avatar
pixelwave

Community Member, 18 Posts

13 September 2008 at 12:56am

tried it in safari and ie7 ... works nice ... but ie6 ... totally deformed :(

added a picture..

Avatar
pixelwave

Community Member, 18 Posts

13 September 2008 at 2:07am

fixed the strange looking menu ... but searchbar is still currupted in ie6

i uploaded my current version

www.p-wave.eu/actual_version.rar

Avatar
pixelwave

Community Member, 18 Posts

13 September 2008 at 8:13pm

now its finally working in all major browsers... ie6,ie7,safari and firefox... i edit the ie6.css an made some changes in your original files.

thanks again man - really helped me out here :)

.. but still dont know, why the hole bar isnt centered in ie6 and 7 (searchbar is just added to the right)