Web Analytics Made Easy -
StatCounter Form button background image - CodingForum

Announcement

Collapse
No announcement yet.

Form button background image

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    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 a DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

    Comment


    • #3
      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 a DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

      Comment


      • #4
        Thanks Excavator! I guess I was trying to make it more difficult than it needed to be.

        Comment

        Working...
        X