Theme Search box position
danharper - November 6, 2009 - 11:55
I have developed a basic theme for my employer but I'm struggling with targeting the search box you can see from the link below what I mean. The search box is slightly offset and I can't work out how to target it using css.
I am using the advanced search module if that makes any difference.
If anybody could give me a few pointers that would be great.
Cheers Dan

...
Floats can be a pain in the arse to get right when requiring really accurate positioning and can drive me batty.
Try something different, such as using relative and absolute positioning (may need some IE6 adjustments)...
#nav {
position:relative;
}
#edit-search-theme-form-1-wrapper {
margin:0;
padding:0;
}
#top-search,
#search-theme-form #edit-submit {
position:absolute;
right:0;
}
#search-theme-form #edit-search-theme-form-1 {
position:absolute;
right:35px;
top:6px;
}
You'll want to remove the negative margin top and other attempts you have made to position the input field for this to work cleanly. The idea is really simple here, using position absolute to position both the input elements.
Professional Drupal Design and Theme Services
Thanks
Thanks very much I will give this a try.
Dan
It worked
Worked great thanks very much again
Dan