Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    28
    Thanks
    3
    Thanked 4 Times in 4 Posts

    Form button background image

    Hello, I would like to make the form submit button look the way way I have styled my links on this page. I don't know how to get rid of the borders for one thing. My css may be kind of a mess too but it validates except for the -moz-border-radius/-webkit-border-radius and warnings about floated element widths. The stylesheet that covers the links and buttons is here. In case you don't feel like looking there, here is my links css that I would like the button to look like:
    Code:
    #invertbutton {color: rgb(68,53,0);
    	display:block;
    	background: transparent url("img/invertbutton.png") no-repeat top left;
    	width: 111px;
    	height:18px;
    	margin: 10px auto;
    	font-size: .75em;
    	font-weight:bold;
    	text-decoration: none;
    	vertical-align: middle;
    	padding-top:3px;
    	}
    #invertbutton:hover {background: transparent url("img/invertbutton.png") no-repeat 0 -21px;
    	color: #fff;
    	}
    #invertbutton:active {background: transparent url("img/invertbutton.png") no-repeat 0 -42px;
    	color: rgb(186,3,3);
    	padding-top:4px;
    	height:17px;
    	}
    Thanks for any help you can offer.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,739
    Thanks
    22
    Thanked 1,837 Times in 1,821 Posts
    Try this F-b0mb,

    Code:
    #chatsubmit {
    	width: 111px;
    	height:24px;
    padding: 0 0 5px 0;
    	float:right;
    color: rgb(68,53,0);
    	background: transparent url("img/invertbutton.png") no-repeat top left;
    	font-size: .75em;
    	font-weight:bold;
    	text-decoration: none;
    	}
    #chatsubmit:hover {
    background: transparent url("img/invertbutton.png") no-repeat 0 -21px;
    	color:#fff;
    	}
    You might play with that height and padding some more to get it closer.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,739
    Thanks
    22
    Thanked 1,837 Times in 1,821 Posts
    Oops.
    Sorry, forgot about the border.
    Have a try with this -
    Code:
    #chatsubmit {
    	width: 111px;
    	height:21px;
    padding: 0 0 5px 0;
    	float:right;
    border: none;
    color: rgb(68,53,0);
    	background: transparent url("img/invertbutton.png") no-repeat top left;
    	font-size: .75em;
    	font-weight:bold;
    	text-decoration: none;
    	}
    #chatsubmit:hover {
    background: transparent url("img/invertbutton.png") no-repeat 0 -21px;
    	color:#fff;
    	}
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    F-b0mb (04-11-2009)

  • #4
    New Coder
    Join Date
    Mar 2009
    Posts
    28
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Thanks Excavator! I guess I was trying to make it more difficult than it needed to be.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •