CSS: Align background image - css

I'm using a background image for a submit button that I've using for a search form, and am trying to align the submit button/background image it so that it's vertically centered within the search input bar.
Check out the JSFiddle with my code to get a better idea of what I mean:
http://jsfiddle.net/XVx5A/3/
It aligns perfectly for FF and Chrome, but for some reason is stuck above the input bar in IE, and I can't seem to figure out why. Any advice on what's going on here and how to make this work in IE?
Note: I was originally using the image itself to submit the form, but do not want to go that way because of the automatic x & y coordinates messing up the clean url structure.
Thanks in advance for your help.

Floating the button and adding a fixed height to the search field normalizes positioning. Updated: http://jsfiddle.net/XVx5A/21/
You could also make the submit transparent and include the search icon as the text field's background.

Try to remove height:20px from .submit_search_icon. At least on Mac it looks better in Chrome.

Related

how to know webkit line clamp is actived

Excuse me
I use -webkit-line-clamp attribute to hide extra text when necessary.
Now I have a button for click to show extra data when it is hidden. how can I know when to show the button?
Can anybody help me, thanks!
img

how to fix customize select box using css?

I'm trying to modify a default select box using CSS. I've already done it. But, some problems are happened at firefox. What I've done still now:
It's the perfect result on all browser except firefox and IE
At firefox, there are the problems:
(1) There are an unexpected border on the right side of the select box
(2) Padding of text of select box is much bigger than other input field.
At IE, same problem happened. There are unexpected and much clear box at the right of the select box:
How can I remove that unexpected line/box from firefox and IE. Also, what can be responsible for the padding problem at firefox?
Well, I've used this tutorial's concept to customize the select box using CSS only. And I've put my code at
jsfiddle.net/w9kFc/1/
(I can't add the select-icon image at jsfiddle from external link. So, I've taken the screenshot locally. But, I've given the image's link at the jsfiddle code. )
This seems to work in IE10: jsFiddle
Added a label around the select.
Replaced the text-indent with padding.

Twitter Bootstrap Image Centring With Overlay

I'm trying to get a centered image that spans the entire page, with a small text box overlay. You can see my attempt at www.cloudtute.com.
Unfortunately this doesn't work in all browsers and the form elements look weird in some browsers. E.g. trying it in internet explorer 9 it comes up tiled and the text box is black!
I was trying to go for a similar effect to the image on www.airbnb.com which works in all browsers - can anyone tell me where I'm going wrong please?
From what you've explained it shouldnt be too difficult. However www.cloudtute.com isnt opening for me, it comes up with not found, so I cant see your code. If you can add your current code or get the website working again I can help out.

using css, how to position image so when resizing window, image will not move

i was wondering if anyone could help me with css. ive been stuck on using background-attachment:fixed;
it just doesn't seem to work. im basically trying to make an image a link, but i don't want it to scroll so i made it into a bg image.
i have...
when i take out background-attachment:fixed, i see the image, but once i put it in, it disappears. i deliberately left out text between the anchor tags so the image is like a clickable link : D
ive been super stuck. help would be much appreciated. thanks! css syntax is confusing...
Simply add a character to your anchor tag. A non breaking space will do the trick.
See my example on the very useful tool, jsfiddle.net.

interactive map not working in IE7

I am trying to build an interactive map using an imagemap and jquery. I have it completed and it works great in FireFox but IE7 is causing some issues.
You can take a look at it here:
http://www.thecolumbianchicago.com/map/
In IE7 the title of the rollover is not getting the width set properly. Also once you rollover the tall building icon in the center, the background of the title disappears. I'm guessing its a CSS issue but I can't figure it out.
Anyone got any ideas?
Thanks
I figured it out, it was the javascript. I guess IE doesn't like .attr('width') and was returning a zero. I changed the code to have the width put into the image as rel="width" and used .attr('rel') and its all good now.
Don't mess with html image maps. You can use vector based interactive maps with jVectorMap.

Resources