Categories

HTML/CSS. Styling active button condition

Julia Rovena December 26, 2011
Rating: 4.6. From 5 votes.
Please wait...

This tutorial shows how to create a new button in HTML and its style in CSS file.

1) First you need to add a button in HTML file. The easiest way to do that is to use a basic <a> tag. Like in the following coding:

<a class="button" href="#">Button_text_here</a>

2) Create the style for the button in style.css file: select the background color, width and padding. For example:

  .button1 {background:#000000;padding:5px;}

3) The style for the button on hover is created in the same way. You should create the css class ".button_name:hover":

  .button1:hover {background:#FF0000; padding:5px;}

4) Save the changes in HTML and CSS files and open index.HTML file to preview the changes on the site.

how to change Google Map location in WordPress


Top Wordpress Themes
This entry was posted in Working with CSS, Working with HTML and tagged active, button, css, hover, HTML. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket

Live Chat
We help you to choose the right product.