2 replies [Last post]
roscoe
roscoe's picture
Offline
Enthusiast
Last seen: 12 years 14 weeks ago
Joined: 2006-03-09
Posts: 138
Points: 0

html: http://roscoecreations.com/exitpro/
css: http://roscoecreations.com/exitpro/css/style.css

As you can see I have a search box in my header div and I want the magnifying glass aligned right next to it so it looks like its inside the search box. Now I used align="texttop" so that it would work in FireFox but this does not work for IE6. I'm sure there is a better way that will work for both instead of align="texttop". I tried using margins and padding on the image but it just moved the whole form down including the search box so it still wasn't aligned. Any suggestions on how to do this a better way that will work for both browsers? Thanks.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 6 years 1 week ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

Why don't you put the

Why don't you put the magnifying glass in as a bg-image of the input (with a bit of right padding so the text doesn't go over it) and then you don't have to worry about it not lining up right?

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

roscoe
roscoe's picture
Offline
Enthusiast
Last seen: 12 years 14 weeks ago
Joined: 2006-03-09
Posts: 138
Points: 0

great idea, thanks.

great idea, thanks.