I am using dreamweaver to create a website and I thought of just using Photoshop to create backgrounds. I decided to do so only because in case I’d choose to change the button name easily by just editing the codes, I could just refer to the code. If I would construct buttons using Photoshop, I wouldn’t be able to edit the Texts in those buttons or in any element easily.
So my question is simple, How do I create a button that has a simple inline style making it transparent leaving the value of the button still visible.
.button {
background-color: Transparent;
background-repeat:no-repeat;
border: none;
cursor:pointer;
overflow: hidden;
}
It still leaves a border shade after your click it.
6
Answers
To get rid of the outline when clicking, add
outline:none
JSFiddle example
The solution is pretty easy actually:
This is doing an inline style. You’re defining the border to be 1px, solid line, and black in color. The background color is then set to transparent.
UPDATE
Seems like your ACTUAL question is how do you prevent the border after clicking on it. That can be resolved with a CSS pseudo selector:
:active
.JSFiddle Demo
Make a div and use your image ( png with transparent background ) as the background of the div, then you can apply any text within that div to hover over the button. Something like this:
CSS:
Setting its background image to none also works:
**add the icon top button like this **