By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,963 Members | 1,841 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,963 IT Pros & Developers. It's quick & easy.

Makeing a button invisible.

KeredDrahcir
100+
P: 426
I want to be able to use CSS to make a button invisible but for people still be able to select it if they manage to mouse over.

I have no control of the HTML of the button and though this might be the best way of hidding it so I can put an image in it's place.

Is this the best way to go about it, and if so how do I do ir. I've set this visibility to none but it doesn't seem to let me click on it.
Apr 13 '11 #1

✓ answered by KeredDrahcir

Yes I did solve it, perhaos I can make myself more clear in case anyone else has this problem.

I changed the background colour, border colour and text colour of the button to the same colour as the background of the div it was in to hide the button and then changed the background image of the button to the image I wanted to use and changed the dimesnions of the button to fit the image.

Share this Question
Share on Google+
4 Replies


Rabbit
Expert Mod 10K+
P: 12,430
You don't need to overlay an image on a button to make a clickable image. Just use an image with an onclick event or if you're just trying to link them to another page, use an anchor with an image.
Apr 13 '11 #2

KeredDrahcir
100+
P: 426
As I pointed out. I haven't got access to the source HTML, only the CSS.

I thought the onclick had to be included in the HTML rather than the CSS. Is that right? I think there is the same problem doing an anchor when an image.

Also the button is already included in the source which is why I need to hide it. I have sorted it but changing the border, background colour and text colour of the button the same same colour and setting the background image to the image as the button dimensions to fit.
Apr 14 '11 #3

Rabbit
Expert Mod 10K+
P: 12,430
It sounds like you resovled your problem but I can't be sure. I'm having difficulty understanding what you're saying.
Apr 14 '11 #4

KeredDrahcir
100+
P: 426
Yes I did solve it, perhaos I can make myself more clear in case anyone else has this problem.

I changed the background colour, border colour and text colour of the button to the same colour as the background of the div it was in to hide the button and then changed the background image of the button to the image I wanted to use and changed the dimesnions of the button to fit the image.
Apr 15 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.