Forums / Templates, Stylesheets, Page Layout / Line up search button next to search box

Line up search button next to search box

Views: 1,789

Results 1 to 7 of 7
15 Jan 2011, 2:29 AM
#1
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Line up search button next to search box

Exactly that see here the search button doesn't line up next to the search input box, I am looking at resorting to some table based hacks to get it working at the moment.

It is just stumping me at the moment, should be an easy fix but I'll be blowed if i can figure it out.

Webzings Design
Semi retired from Web Design

15 Jan 2011, 3:34 AM
#3
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Line up search button next to search box

gjh42:

Add to your stylesheet

#navMainSearch input+input+input+input+input {position: relative; top: 0.5em;}

I tried that, it didn't work, not sure if its supposed to have that many inputs so i also tried

#navMainSearch input {position: relative; top: 0.5em;}

That also had no effect

Webzings Design
Semi retired from Web Design

15 Jan 2011, 3:57 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Line up search button next to search box

I tested it on your site. What browser are you using? Older browsers (IE6 for sure) don't support the adjacent selector operator (+) even though it has been a standard for about 10 years.

15 Jan 2011, 4:37 AM
#5
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Line up search button next to search box

gjh42:

I tested it on your site. What browser are you using? Older browsers (IE6 for sure) don't support the adjacent selector operator (+) even though it has been a standard for about 10 years.
Tested in FF 3.6.13, Opera 11, IE 9 (no matter how many hard refreshes I have tried)

Seems to work in chrome and Safari

Its currently set to use your code, does it look right to you, as i may have to reboot to clear the cache completely (Normally only IE and FF play up like this)

Webzings Design
Semi retired from Web Design

15 Jan 2011, 5:11 AM
#6
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Line up search button next to search box

Update OK closed all browsers ran CCleaner to clear the caches

0.5em -- displays perfectly in Firefox & Safari (but still not in line with search box in all other browsers)
0.7em -- displays perfectly in Chrome and Opera (but now button in firefox is lower than search box, and IE still no different)

so currently its set at 0.6em, but IE is the most common browser on this site

Webzings Design
Semi retired from Web Design

15 Jan 2011, 6:24 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Line up search button next to search box

Annoying that the same measurement is rendered differently, but really annoying that even IE9 doesn't get it at all (for you?).
When I look at it in IE8 it looks fine, but IE7 Compatibility View doesn't move it at all.