html - how to style a javascript button? -
hello struggling styling add together button within of code
i learning javascript , kinda confusing on phone call css class.
check out js fiddle.
http://jsfiddle.net/infinityswift19/6xwyc6tn/
attemping style line >>
<input type="button" value="add" onclick="additem(document.getelementbyid('ch1').rowindex)" />
thanks response.
i suggest adding class button , styling way.
<input class="my-button" type="button" value="add" onclick="additem(document.getelementbyid('ch1').rowindex)" />
then in css:
.my-button { styles want go here }
you should come more meaningful class name "my-button", idea. nice because can reuse class later if need to. example, if have link needs same button, can like:
<a href="http://wwww.google.com" class="my-button">google button</a>
edit: jsfiddle class added first button: http://jsfiddle.net/yplqjmwa/
javascript html css styles
No comments:
Post a Comment