/    Sign up×
Community /Pin to ProfileBookmark

want to use 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
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@PhillMcJul 31.2004 — You are right. <button> gives you a system default button, and the button will be rendered by the client machines OS defaults. If you want to use a custom button, then you will have to modify your code to work with an image.
Copy linkTweet thisAlerts:
@danielOneauthorJul 31.2004 — that if i place the same code into:

<img src="blabla.gif" onClick="....>

??? tried that didnt seem to work, but maybe you ment that i will have to change the complete code and not where it is placed ? ´

if i need to change the complete code, could someone give me an idea of how to?!

thanks,

daniel?
Copy linkTweet thisAlerts:
@Daniel_TJul 31.2004 — I replied to your [url=https://webdeveloper.com/forum/showthread.php?threadid=40798]other post[/url]. By the way, please don't cross-post.
Copy linkTweet thisAlerts:
@PhillMcJul 31.2004 — :rolleyes:

Dang cross-posters, lol
×

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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...