/    Sign up×
Community /Pin to ProfileBookmark

own designed button

i am using the following code to hide a layer with in css:

<button onclick=”document.getElementById(‘layer1’).style.visibility=’hidden'”>Hide Element</button>

i know that “<button>” supplies you with a default button design… is it possible to use my own designed button (image saved as a .gif), if yes where does the code go?

thanks for the help,
daniel

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@Daniel_TJul 31.2004 — Put this in the <head>, or if you are using stylesheets, put it in there, minues the <style> tags:<i>
</i>&lt;style type="text/css"&gt;
button {
background: transparent url("buttonbk.gif") no-repeat;
border: 0;
}
&lt;/style&gt;

Change the background attribute to the url of the desired background image.

-Dan
Copy linkTweet thisAlerts:
@danielOneauthorJul 31.2004 — i tried that and i do get a personally designed button in, but it does not function anymore. when i try clicking it nothing happens!? ? ?

is there another way?
Copy linkTweet thisAlerts:
@danielOneauthorJul 31.2004 — sorry for cross-posting, won't happen again!

:o
Copy linkTweet thisAlerts:
@Daniel_TJul 31.2004 — Changing the styles should in no way affect scripts... could I see an example? (a page where this is happening on)
×

Success!

Help @danielOne spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...