Jump to content

Best Practice For Styling Buttons


Guest

Recommended Posts

Hi All

I'm trying to truly understand my stylesheets.......

I've noticed that IE will not render hovering unless i apply a "onmouseover and onmouseout".... to do this obviously i have to add to my style.css as such

.ACbutt  {

	font-family: "Arial",Helvetica,sans-serif;

	font-size:11px;

	color: #ffffff;

	background-color:#0000FF;

	font-weight: bold;

	border:1px solid #00355F;

	padding-left:4px;

	padding-right:4px;

}

.ACbuttHover {

	background-color:#A1B1C0;

	font-family: "Arial",Helvetica,sans-serif;

	font-size:11px;

	color: #ffffff;

	font-weight: bold;

	border:1px solid #00355F;

	padding-left:4px;

	padding-right:4px;

}




Code in tpl file




<input name="submit" type="submit" value="{TXT_LOGIN}" class="ACbutt" onmouseover="this.className='ACbuttHover'" onmouseout="this.className='ACbutt'" />

Because this is for a few buttons throughout my site, i've decided to give every single button its own style....

My question is,,,,, i have about 15 button styles... is this best practice to do? or is there a simpler way.

Keep it in mind that some buttons i'd like to have more padding then others. No buttons have images by the way.

Your expertise would be greatly appreciated.

Thanks

Antz :yeahhh:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...