Ok. så langt så godt. Nu har jeg fået det til at virke, men jeg har en meget irriterende kant rundt om mine knapper:
ScreenshotCSS-fil:
- body {
- background-color: #167cc6;
- font-family: "Comic Sans MS";
- }
- input.gem {
- display: block;
- width: 100px;
- height: 50px;
- background: url(../img/submit.png) no-repeat 0 0;
- outline: none;
- }
- input.gem:hover {
- background: url(../img/submit.png) no-repeat 0 -50px;
- }
- input.gem:active {
- background: url(../img/submit.png) no-repeat 0 -100px;
- }
- input.ryd {
- display: block;
- width: 100px;
- height: 50px;
- background: url(../img/submit.png) no-repeat 0 0;
- outline: none;
- }
- input.ryd:hover {
- background: url(../img/submit.png) no-repeat 0 -50px;
- }
- input.ryd:active {
- background: url(../img/submit.png) no-repeat 0 -100px;
- }
- input.knap {
- display: block;
- width: 100px;
- height: 50px;
- background: url(../img/submit.png) no-repeat 0 0;
- outline: none;
- }
- input.knap:hover {
- background: url(../img/submit.png) no-repeat 0 -50px;
- }
- input.knap:active {
- background: url(../img/submit.png) no-repeat 0 -100px;
- }
HTML-form:
- <form name="custombuttons" action="#" method="POST">
- <input type="text" name="felt1" placeholder="felt1" /><br />
- <input type="text" name="felt2" placeholder="felt2" /><br />
- <input type="text" name="felt3" placeholder="felt3" /><br />
- <textarea name="felt4" placeholder="Tekst skrives her..."></textarea><br />
- <input type="submit" name="submit" class="gem" value="Send/Udfør" /><br />
- <input type="reset" name="reset" class="ryd" value="Slet/Ryd" /><br />
- <input type="button" name="button" class="knap" value="Knap" /><br />
- </form>
Hvordan fjerner jeg den kant. Det ser jo ikke lige alt for pænt ud.