Categorie: HTML & CSS

Custom list style with Font Awesome

I frequently use Font Awesome when making website to easily add icons to buttons or within the pages. You can also use Font awesome to make a custom list style. This is a useful website to search for Font awesome icons -> http://faicons.com/ and get the unicode to change the icon. You can change the type of … Lees verder Custom list style with Font Awesome

Scrollto element with an id selector using jQuery

For example, if I have a button with an id "btn" and a form with the id "form" and I want to scrollto the form when I click on the button HTML: <p><a href="" id="btn">go to form</a></p> <form id="form"> </form>     jQuery: $(document).ready(function(){ $("#btn").click(function(e){ e.preventDefault(); $('html, body').animate({ scrollTop: $("#form").offset().top }, 1000); }) })  

Generate content with CSS before or after an element

You can easily add content before or after an element . To do so the content property is used with the:before and :after pseudo-elements, to insert generated content.It’s  only supposed to work only for the :before and :after pseudo-elements, but only Opera and Konqueror appear to support this. Safari and Chrome support content without the pseudo elements for images, … Lees verder Generate content with CSS before or after an element

How to hide the facebook Like count

What I do, is put a div on top of the like count which is absolutely positioned The css .facebook_like{ position: relative; float:left; } .facebook_like_hide_count{ width: 50px; height: 20px; background: white; position: absolute; left: 50px; top: 0; }  The HTML <div class="facebook_like"> <fb:like href="http://yoururl.com/" send="false" layout="button_count" width="20" show_faces="true" font=""></fb:like> <div class="facebook_like_hide_count"> </div> </div>